hi,
i tried using stylesheet parameter to hardcode path but error message is displayed --> "Access is Denied"
here is the code i am using:
<xsl:param name="isolang" select="'en'"/>
<xsl:param name="RelPath" select="'c:\Code\Project'"/>
<xsl:variable name="culture"><xsl:value-of select="VUFile/Language/Culture"/></xsl:variable>
<xsl:variable name="doc" select="concat($RelPath,'/Project/FileViewerResources.',$culture,'.xml')"/>
<xsl:variable name="translation" select="document($doc)/labels[lang($isolang)]"/>
Please correct me if i've done something incorrectly. I am new to XSL and XML and still learning. :)
Quote:
quote:Originally posted by mhkay
Presumably you are passing $doc to the document() function. When you do this, it is interpreted as a relative URI that is relative to the base URI of the stylesheet. If you want it treated as relative to somewhere else (like your "current working directory") you may be able to achieve this using the second argument to the document() function, but the simplest way is probably to pass in the current working directory as a stylesheet parameter and construct the absolute path "by hand". This is all a lot easier in XSLT 2.0 which gives you more control over URI resolution.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|