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

problem with document(concat

Subject: problem with document(concat
From: Wolfhart Totschnig <a9507073@xxxxxxxxxxxxxxxxx>
Date: Thu, 26 May 2005 16:18:51 +0200
document concat
Hi,
I am having a problem related to the document() function and would be thankful if anyone could help me.


The xslt script I am working on serves to transform an xml file to html. The original xml file reads

...
<related>314</related>
....

which is to indicate that the current file is related to file "314.xml" in the same directory. What I would like to do is integrate the title of the referenced file into the output html. I tried the following:

...
<xsl:for-each select="related">
<xsl:value-of select="document(concat(.,'.xml'))//rdf:RDF/rdf:Description/dc:title"/>
</xsl:for-each>
...


Yet it doesn't work. When changing the content of the xml file from "314" to "314.xml" and doing
<xsl:value-of select="document(.)//rdf:RDF/rdf:Description/dc:title"/>
it works.
Furthermore, concat(.,'.xml') produces the correct string when put elsewhere, when put inside document(), however, it doesn't work.


Could anyone tell me why what I originally had in mind doesn't work? I tried to integrate the string() function in any way I could think of, use variables, nothing helped.

Thanks for your help,
Wolfhart

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.