Not able to compile exMsxsl!!
Dipesh Khakhkhar <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <3F599003@OrangeMail> |
Hi, I installed the the set up file from the directed location for MSXSL 4.0 with extension function implemented in it. There is small change in the directory structure installed when i ran the setup.exe. In the readme.txt file it is said that the exMsxsl.exe file will be installed in C:\Program Files\EXSLT for MSXML4\msEXSLT But when i installed it there was no mxEXSLT folder. When i am trying to run my xsl and xml file using exMsxsl.exe I am getting the following error. " The filename, the directory name or the volume label syntax is incorrect" I have given properly the name of the input files. Here are my xsl and xml files. These were running perfectly fine in Xalan I just changed the extension and namespaces in it. XML ===== <?xml version="1.0" encoding="UTF-8"?> <Root Att1="val1" Att2="val2"> <Node1 Node1Att="Nval1" Node2Att="Nval2"> <CLASS Table="Firsttable"> <Row> <Column ColName="ValOfColName1">Colvalue1</Column> <Column ColName="ValOfColName2">Colvalue2</Column> <Column ColName="ValOfColName3">Colvalue3</Column> </Row> <Row> <Column ColName="ValOfColName2">Colvalue2</Column> <Column ColName="ValOfColName4">Colvalue4</Column> </Row> </CLASS> </Node1> <Node1 Node1Att="val1" Node2Att="val2"> <CLASS Table="Firsttable"> <Row> <Column ColName="ValOfColName1">Colvalue1</Column> <Column ColName="ValOfColName2">Colvalue2</Column> <Column ColName="ValOfColName3">Colvalue3</Column> <Column ColName="ValOfColName5">Colvalue5</Column> </Row> <Row> <Column ColName="ValOfColName4">Colvalue4</Column> <Column ColName="ValOfColName6">Colvalue6</Column> </Row> </CLASS> </Node1> </Root> --------------------------------------------------------------------- XSL === <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" xmlns:set="http://exslt.org/sets" extension-element-prefixes="set"> <xsl:output method="text"/> <!-- Ouput a sparse text table using Xalan extensions --> <xsl:template match="/"> <!-- Note: doesn't account for table names that contain extra spaces --> <xsl:for-each select="set:distinct(//Root/Node1/CLASS/@Table)"> <xsl:variable name="thisTable" select="."/> <xsl:variable name="tableColNames"> <xsl:for-each select="set:distinct(//Root/Node1/CLASS[normalize-space(@Table)=$thisTable]/Ro w/Column/@ColName)"> <columnName><xsl:value-of select="."/></columnName> </xsl:for-each> </xsl:variable> <xsl:apply-templates select="//Root/Node1/CLASS[normalize-space(@Table)=$thisTable]"> <xsl:with-param name="tableColNames" select="exsl:nodeset($tableColNames)"/> </xsl:apply-templates> </xsl:for-each> </xsl:template> <xsl:template match="CLASS"> <xsl:param name="tableColNames"/> <!-- emit the string of unique column names --> <xsl:for-each select="$tableColNames/columnName"> <xsl:value-of select="."/> <xsl:if test="not(position()=last())">`</xsl:if> </xsl:for-each> <xsl:apply-templates> <xsl:with-param name="tableColNames" select="$tableColNames"/> </xsl:apply-templates> </xsl:template> <xsl:template match="Row"> <xsl:param name="tableColNames"/> <xsl:variable name="thisRow" select="."/> <xsl:for-each select="$tableColNames/columnName"> <xsl:variable name="thisCol" select="string(.)"/> <xsl:choose> <xsl:when test="$thisRow/Column[@ColName = $thisCol]"><xsl:value-of select="$thisRow/Column[@ColName = $thisCol]"/>`</xsl:when> <xsl:otherwise>`</xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> <xsl:template match="@*|*"> <xsl:param name="tableColNames"/> <xsl:copy> <xsl:apply-templates select="@*|node()"> <xsl:with-param name="tableColNames" select="$tableColNames"/> </xsl:apply-templates> </xsl:copy> </xsl:template> </xsl:stylesheet> --------------------------------------------------------------------- Any hint or help will be highly appreciated. Regards, Dipesh