[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XMLFilter in a URIResolver

Subject: RE: XMLFilter in a URIResolver
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 11 Sep 2003 14:02:47 +0100
saxsource xmlfilter
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.