Subject: RE: [xsl] XMLFilter in a URIResolver From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx> Date: Thu, 11 Sep 2003 14:02:47 +0100 |
> Create a SAXSource, whose InputSource is the actual XML file, and whose > XMLReader is the XMLFilter. Return the SAXSource as the result of the > URIResolver. > > (untested) Thanks Mike, I now get the error, Warning: The SAX2 parser does not support a required namespace feature Which I guess is related to the XMLFilter, which looks like: public void startElement(String namespaceURI, String localName, String qualifiedName, Attributes atts) throws SAXException { AttributesImpl newAttributes = new AttributesImpl(atts); newAttributes.addAttribute("", "elementID", "elementID", "", counter+""); atts = newAttributes; counter++; super.startElement(namespaceURI, localName, qualifiedName, atts); } This method simply adds @elementID to each element. The code that calls this (in the resolver) is: SAXSource s = new SAXSource(); s.setInputSource(new InputSource(is)); s.setXMLReader(addElementIdToXML); return s; I'm using Saxon 7.6.5a and crimson. Do I need to set the XMLReader on the XMLFilter?? Or am I missing the point? When I do set it, the XMLFilter seems to be ignored. When its not set, I get the error. Surely I need to set it... Still confused, andrew XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XMLFilter in a URIResolve, Michael Kay | Thread | RE: [xsl] XMLFilter in a URIResolve, Michael Kay |
RE: [xsl] XMLFilter in a URIResolve, Michael Kay | Date | [xsl] Need to fill in number of out, Steve Freeman |
Month |