Altova Mailing List ArchivesMSXSL 4.0 command line parameter questionTo: NULL Date: 3/2/2005 12:55:00 PM I have a question regarding the parsing of command line specificed parameters for an XSLT stylesheet - what appears to happen is my parameter is being interpreted as a literal string instead of as an XPath expression. My XML data is: person.xml <?xml version="1.0" encoding="UTF-8"?> <NewDataSet> <Person> <pID>1234</pID> <LastName>Laub</LastName> <FirstName>David</FirstName> <Addr1>123 Jerome</Addr1> <Addr2>Appt 10</Addr2> <City>Skokie</City> <State>IL</State> <ZipCode>60076</ZipCode> </Person> </NewDataSet> My XSLT stylesheet is: entity.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:param name="Entity" select="./NewDataSet/Person" /> <xsl:template match="NewDataSet"> <xsl:copy-of select="$Entity"/> </xsl:template> </xsl:stylesheet> My MSXSL command line is ANY of the following msxsl person.xml entity.xsl -o Entity.xml Entity=./NewDataSet/Person msxsl person.xml entity.xsl -o Entity.xml Entity="./NewDataSet/Person" (note double quotes) msxsl person.xml entity.xsl -o Entity.xml Entity='./NewDataSet/Person' (note single quotes) The ouput of this transform is: <?xml version="1.0" encoding="UTF-8"?>./NewDataSet/Person (in other words my parameter is being interpreted as a literal string instead of an XPath expression) I CAN get the correct output (the Person sub-tree) in XMLSPY when I specify the parameter Entity as ./NewDataSet/Person (NO quotes) <?xml version="1.0" encoding="UTF-8"?> <Person> <pID>1234</pID> <LastName>Laub</LastName> <FirstName>David</FirstName> <Addr1>123 Jerome</Addr1> <Addr2>Appt 10</Addr2> <City>AltamoSkokie</City> <State>IL</State> <ZipCode>^0076</ZipCode> </Person> So CAN I specify my parameter as an XPath expression (versus a string literal) with the command line MSXSL utility? Thanks | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
