You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Devaprasad Rajakumar <dr...@sapient.com> on 2004/02/12 21:43:27 UTC
RE: WELCOME to xalan-c-users@xml.apache.org
Hi
When using xalan to transform an xml which has one of its namespace
declaration as xmlns:z="#RowsetSchema" using an xsl which has a
corresponding name space declaration as
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
I get the error :
javax.xml.transform.TransformerException: Extra illegal tokens:
'#RowsetSchema', ':', 'row', '/', '@', 'MESSAGE_TYPE', '=', ''UTILTS
E29''
Surprisingly this works fine with saxon and other parsers.
Snippets of my XML and XSL's
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<xml>
<s:Schema id="RowsetSchema">
s:ElementType name="row" content="eltOnly">
<s:AttributeType name="MESSAGE_TYPE"
rs:number="1" rs:nullable="true" rs:writeunknown="true">
<s:datatype dt:type="string"
rs:dbtype="str" dt:maxLength="10" rs:fixedlength="true"/>
</s:AttributeType>....
</s:Schema>
<rs:data>
<z:row MESSAGE_TYPE="UTILTS E29" MESSAGE_NUMBER="3000"
MESSAGE_DATE_TIME="2004-02-04T23:09:08"
BALANCE_SUPPLIER_EAN="12" BALANCE_RESPONSIBLE_PARTY_EAN="Grid1"
GRID_AREA_EAN="8716959259711"
METERING_PERIOD_FROM="2002-12-24T13:45:00"
METERING_PERIOD_TO="2002-12-25T13:45:00" ACTIVE_ENERGRY="E"
REASON="RECONCILIATION" SETTLEMENT_METHOD="profiled"
PERIOD_START="2002-12-24T13:45:00" PERIOD_END="2003-01- 24T13:45:00"
VOLUME="101" VOLUME_TYPE="Z01" TIME_FRAME="E10" TIME_RESOLUTION="15"
MEASUREMENT_UNIT="KWH"/>
</z:row>
</xml>
My XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<xsl:output omit-xml-declaration="no" indent="yes" encoding="ISO-8859-1"
version="1.0"/> <xsl:template
match="xml">................</xsl:template></xsl:stylesheet>
If I remove the # from #RowsetSchema everything works fine.
The input XML is generated by MSXML.
What's the workaround for this?
-Dev
RE: WELCOME to xalan-c-users@xml.apache.org
Posted by da...@us.ibm.com.
Hi,
This works fine with Xalan-C, but it looks like you are using Xalan-J. Why
are you posting a question about Xalan-J on the Xalan-C users list?
Also, posting snippets of XML documents is not helpful. A small,
_complete_, concise example will make addresssing this much easier.
Dave
"Devaprasad
Rajakumar" To: <xa...@xml.apache.org>
<drajakumar@sapi cc: (bcc: David N Bertoni/Cambridge/IBM)
ent.com> Subject: RE: WELCOME to xalan-c-users@xml.apache.org
02/12/2004 12:43
PM
Please respond
to xalan-c-users
Hi
When using xalan to transform an xml which has one of its namespace
declaration as xmlns:z="#RowsetSchema" using an xsl which has a
corresponding name space declaration as
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
I get the error :
javax.xml.transform.TransformerException: Extra illegal tokens:
'#RowsetSchema', ':', 'row', '/', '@', 'MESSAGE_TYPE', '=', ''UTILTS
E29''
Surprisingly this works fine with saxon and other parsers.
Snippets of my XML and XSL's
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<xml>
<s:Schema id="RowsetSchema">
s:ElementType name="row" content="eltOnly">
<s:AttributeType name="MESSAGE_TYPE"
rs:number="1" rs:nullable="true" rs:writeunknown="true">
<s:datatype
dt:type="string"
rs:dbtype="str" dt:maxLength="10" rs:fixedlength="true"/>
</s:AttributeType>....
</s:Schema>
<rs:data>
<z:row MESSAGE_TYPE="UTILTS E29" MESSAGE_NUMBER="3000"
MESSAGE_DATE_TIME="2004-02-04T23:09:08"
BALANCE_SUPPLIER_EAN="12" BALANCE_RESPONSIBLE_PARTY_EAN="Grid1"
GRID_AREA_EAN="8716959259711"
METERING_PERIOD_FROM="2002-12-24T13:45:00"
METERING_PERIOD_TO="2002-12-25T13:45:00" ACTIVE_ENERGRY="E"
REASON="RECONCILIATION" SETTLEMENT_METHOD="profiled"
PERIOD_START="2002-12-24T13:45:00" PERIOD_END="2003-01-
24T13:45:00"
VOLUME="101" VOLUME_TYPE="Z01" TIME_FRAME="E10" TIME_RESOLUTION="15"
MEASUREMENT_UNIT="KWH"/>
</z:row>
</xml>
My XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<xsl:output omit-xml-declaration="no" indent="yes" encoding="ISO-8859-1"
version="1.0"/> <xsl:template
match="xml">................</xsl:template></xsl:stylesheet>
If I remove the # from #RowsetSchema everything works fine.
The input XML is generated by MSXML.
What's the workaround for this?
-Dev