Subject: Re: [xsl] using a parameter to modify part of the file path in document(...) function From: "Tracey Zellmann" <tracey.zellmann@xxxxxxxxxxx> Date: Sun, 17 Sep 2006 14:57:28 -0400 |
I have this in my transformer set-up: transformer.setParameter("buildingDataFile", this.buildingDataName); where this.buidingDataName is "TownHouseData"
Change your call on document() to
document(concat('../', $buildingDataFile, '/inputXML/buildingStories.xml'))
Michael Kay http://www.saxonica.com/
-----Original Message----- From: Tracey Zellmann [mailto:tracey.zellmann@xxxxxxxxxxx] Sent: 16 September 2006 20:09 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] using a parameter to modify part of the file path in document(...) function
I am using XSLT 2.0 and JAVA 1.5.0_07 and the Saxon B net.sf.saxon.TransformerFactoryImpl Transformer.
In my style sheet, I currently import an xml document <xsl:variable name="list" select="document('../inputXml/storyPages.xml')"/>
Now that everything works, I want to change my input file arrangements and use different documents, each named storyPages.xml, but from different directories.
examples:
../TownHouseData/inputXML/buildingStories.xml ../MiddlesexHotelData/inputXML/buildingStories.xml ../DamonMillData/inputXML/buildingStories.xml
and so forth.
I can set a parameter in my java program, transformer.setParameter("buildingDataFile", "TownHouseData");
and use a different setting for the other buildings.
My problem is that I always get confused in XSLT using variables and parameters inside double and single quoted strings.
What is a clean syntax for accomplishing this?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] using a parameter to modi, Michael Kay | Thread | Re: [xsl] using a parameter to modi, Tracey Zellmann |
[xsl] RE: consolidating footnotes i, Ann Marie Rubin \(an | Date | Re: [xsl] using a parameter to modi, Tracey Zellmann |
Month |