[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] getting text from external xml file
Marie Sauvage - EBM WebSourcing wrote: > To pass it as a parameter would be easy for me, as I get it in my ant script > before to call the generation ! > How can I pass it as a parameter ? From the command line, saxon inputFile.xml stylesheet.xsl date=2007-07031 > > But can you tell me more about the xpath solution ? or maybe give me a link to > where to find doc about it ? > I think it could be better to have it directly in the stylesheet. With the input file <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <name>My Project</name> <artifactId>my-project</artifactId> <groupId>my.group</groupId> *<version>1.5</version>* xmlns:ms="http://maven.apache.org/POM/4.0.0" It would be <xsl:value-of select="document('x.xml')/ms:project/ms:version"/> if you wanted version or <xsl:value-of select="document('x.xml')/ms:project/ms:ModelVersion"/> to get 4.0.0 regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]