| Subject: RE: [xsl] Extract input filename From: "J. S. Rawat" <jrawat@xxxxxxxxxxxxxx> Date: Thu, 17 May 2007 14:13:57 +0530 | 
Error
undeclared namespace prefix {xs}1. Change this:
<xsl:variable name="filename" select="document('input_meta.xml')" />
to this:
<xsl:param name="meta" as="xs:string" required="yes"/> <xsl:variable name="filename" select="document($meta)" />
(you might also like to change the name of the variable filename, as it's a misleading name)
2. Change your command line to
java -jar saxon8.jar input.xml x.xsl meta=input_meta.xml >c.xml
Michael Kay http://www.saxonica.com/
> I have no idea about to extract input filename by passing > argument in command line. In the below examples, I don't want > to hardcode "input_meta.xml". > > Input files > 1. input.xml > 2. input_meta.xml > > command line > java -jar saxon8.jar input.xml x.xsl >c.xml > > Stylesheet > <xsl:variable name="filename" select="document('input_meta.xml')" /> > <xsl:template match="/"> > <doi> > <xsl:copy-of select="$filename/doi/text()" /> > </doi> > </xsl:template> > > Thanks in advance. > JSR
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] Extract input filename, Michael Kay | Thread | RE: [xsl] Extract input filename, Michael Kay | 
| RE: [xsl] Extract input filename, Michael Kay | Date | RE: [xsl] Extract input filename, Michael Kay | 
| Month |