[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem with document() function on web server

Subject: Problem with document() function on web server
From: Maria Amuchastegui <mamuchastegui@xxxxxxxxxxx>
Date: Mon, 11 Jul 2005 09:42:54 -0400
web server template
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&#233;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&#233;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>
 
Maria

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.