Subject: Re: [xsl] Problem with document() function on web server From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Mon, 11 Jul 2005 15:51:34 +0200 |
I tried two different versions of the document() function to format dates.
Both versions worked on my local hard drive but not on the web server. I
know that I have a more recent version of Xalan on my hard drive, but I am
wondering if something else is causing the problem.
This version of the template, in which the monthnames were stored in
separate namespace, caused the stylesheet to stop transforming.
<fr:month-names>
<fr:month num="01">jan</fr:month>
<fr:month num="02">fév</fr:month>
<fr:month num="03">mar</fr:month>
</fr:month-names>
<xsl:template name="FrenchMonth">
<xsl:value-of
select="document('')/*/fr:month-names/fr:month[@num=$month]"/>
</xsl:template>
This version of the template, in which the monthnames were stored in an
external XML file, returned a null value.
<MonthNames>
<French>
<Name num="01">jan</Name>
<Name num="02">fév</Name>
<Name num="03">mar</Name>
</French>
</MonthNames>
<xsl:variable name="FrenchMonth"
select="document('month_names.xml')/MonthNames/French"/>
<xsl:template name="FrenchMonth">
<xsl:value-of select="$FrenchMonth/Name[@num=$month]"/>
</xsl:template>
HTH, Geert
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Problem with document() funct, Maria Amuchastegui | Thread | RE: [xsl] Problem with document() f, Maria Amuchastegui |
[xsl] Problem with document() funct, Maria Amuchastegui | Date | RE: [xsl] Problem with document() f, Maria Amuchastegui |
Month |