[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Extract input filename
Subject: RE: [xsl] Extract input filename From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Thu, 17 May 2007 11:10:14 +0100 |
Well, that probably means you changed the parameter name from "meta" to "data" in one place but not in the other place. > -----Original Message----- > From: J. S. Rawat [mailto:jrawat@xxxxxxxxxxxxxx] > Sent: 17 May 2007 10:39 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] Extract input filename > > New error has been introduced!! > error > XTDE0050: No value supplied for required parameter data > > At 10:26 AM 5/17/2007 +0100, you wrote: > >The namespace prefix xs is the conventional prefix for > >http://www.w3.org/2001/XMLSchema which is where the data > types are defined. > >You don't have to declare the data types of your variables and > >parameters in XSLT 2.0 but it's good practice and I do it as > a matter of habit. > > > >Michael Kay > >http://www.saxonica.com/ > > > > > -----Original Message----- > > > From: J. S. Rawat [mailto:jrawat@xxxxxxxxxxxxxx] > > > Sent: 17 May 2007 09:44 > > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > > Subject: RE: [xsl] Extract input filename > > > > > > Thanks for the prompt reply. Would you please let me know > about the > > > namesspace value of prefix {xs} as an error is throughing while > > > converting. > > > > > > Error > > > undeclared namespace prefix {xs} > > > > > > At 08:46 AM 5/17/2007 +0100, you wrote: > > > > > > >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, J. S. Rawat | Thread | RE: [xsl] Extract input filename, J. S. Rawat |
RE: [xsl] Extract input filename, J. S. Rawat | Date | RE: [xsl] Extract input filename, J. S. Rawat |
Month |
Keywords