You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by James House <jh...@part.net> on 2001/09/19 19:02:32 UTC
Problem with Xalan or with Micro$oft format?
I'm having a problem using Xalan (2.1.0 and xerces 1.4.3) to transform an
XML file format that a customer is creating using Micro$oft's ADO crud.
I'm hoping someone can help me find a work-around or can tell me of a way
to put Xalan/Xerces in a mode where it won't complain about the issue I'm
having.
Here's the synopsis:
The problem lies with the name space junk generated by ADO... here's an
example:
<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'>
Because this is in the output XML, I obviously need to define the same name
spaces in my style sheet....
The thing that is causing me grief is the entry: xmlns:z='#RowsetSchema' .
I get the following exception while trying to transform the document:
; SystemID: file:///D:/projects/eb/test.xsl; Line#: 12; Column#: 39
; SystemID: file:///D:/projects/eb/test.xsl; Line#: 12; Column#: 39
javax.xml.transform.TransformerException: Extra illegal tokens:
'#RowsetSchema', ':', 'row'
at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:603)
at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:166)
at org.apache.xpath.XPath.<init>(XPath.java:198)
at
org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:192)
at
org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:573)
at
org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:917)
at
org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1075)
at
org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:357)
at
org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:300)
at
org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTemplateElem.java:120)
at
org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:607)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1238)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:741)
at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:601)
at
com.partnet.eport.iadapters.DefaultXMLFileTransformerThread.main(DefaultXMLFileTransformerThread.java:326)
If I manually remove the '#' character from the name space everything works
fine. -- but this can't be my long term solution as we obviously don't want
to have any manual intervention.
Can anyone make any suggestions for me (other than telling our customer to
dump their microsoft crud)?
Thanks much,
James