Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XInclusion produdes invalid document

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Andrew Thompson <lordpixel AT mac.com>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XInclusion produdes invalid document
  • Date: Mon, 7 Mar 2005 19:07:27 -0500

In answer to your question from the other mail, I thought I was using Xalan 2.6, but I was using the JDK build in version. Now I'm definitely using Xalan 2.6 - confirmed by setting -verbose:class.

It doesn't make any difference though. the xml:base attributes are still stripped and the xml:lang still goes through.

On Mar 7, 2005, at 3:12 AM, Elliotte Harold wrote:

But I couldn't find a way to do it. There's no way to match xmlns:xi in a stylesheet that I can find.


You can't match it but you can do this:

"<xsl:stylesheet version=\"1.0\" " +
" exclude-result-prefixes=\"xi\"" +
" xmlns:xi=\"http://www.w3.org/2001/XInclude namespace\"" +
" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\""; +
" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\";>" +

If I enter that as written, I get:

Resolving includes in /Volumes/Mesa/Stuff/website bits/index.xml to /Volumes/Mesa/Stuff/website bits/index.html
Illegal path character
nu.xom.ParsingException: Illegal path character at line -1, column -1.
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at xincluder.XIncluder.stripXMLBaseAttributes(XIncluder.java:70)
at xincluder.XIncluder.<init>(XIncluder.java:46)
at xincluder.XIncluder.main(XIncluder.java:93)
Caused by: nu.xom.MalformedURIException: Illegal path character
at nu.xom.Verifier.throwMalformedURIException(Unknown Source)
at nu.xom.Verifier.checkPath(Unknown Source)
at nu.xom.Verifier.checkAbsoluteURIReference(Unknown Source)
at nu.xom.Element.addNamespaceDeclaration(Unknown Source)
at nu.xom.NonVerifyingHandler.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U nknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRoot ElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
... 5 more

If I modify the line to look like this

" xmlns:xi=\"http://www.w3.org/2001/XInclude\""; +

Then it runs but it doesn't work. xmlns:xi is still output to the result document.

Was that a typo in your email?

AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

(see you later space cowboy ...)





Archive powered by MHonArc 2.6.24.

Top of Page