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

JAXP: namespaces/namespace-prefixes features for SAXRe

Subject: JAXP: namespaces/namespace-prefixes features for SAXResult
From: "Nikolai Grigoriev" <grig@xxxxxxxxxxx>
Date: Tue, 10 Dec 2002 01:24:27 +0300
jaxp namespace
Hi all,

I am reading output of an XSLT transformation through
javax.xml.transform.sax.SAXResult. It looks very similar 
to using an XMLReader: I set a ContentHandler and 
get information through its callbacks. However, an
XMLReader can deliver parse results in a variety 
of ways. In particular:

- qNames can be present or null;
- start/endPrefixMapping() events may be fired or skipped;
- xmlns:* attributes may be present or absent in the attribute lists.

For an XMLReader, I can tame this zoo through setFeature() method, using 
two features http://xml.org/sax/features/namespaces and
http://xml.org/sax/features/namespace-prefixes
(a  table at http://www.saxproject.org/?selected=namespaces, 
"Configuring Namespace Support" unambiguously defines behaviour 
for each feature combination). Even if the parser does not support 
a particular pairing, I can at least query its capabilities, and adjust 
my ContentHandler accordingly.

Now I pass to JAXP. The same ContentHandler is fed to a Transformer 
(wrapped into a SAXResult); so I would expect either the Transformer 
or its mother TransformerFactory to recognize SAX2 features. I have 
browsed the whole JAXP 1.1 specification looking for a way to set 
(or at least to query) the features, but in vain. I could not even find 
the exact description of the default behaviour. Looks like the choice 
of values for SAX properties is implementation-dependent - but this
would undermine the whole idea of pluggability, so I am definitely 
missing some important piece of the puzzle.

In view of the above, my questions are:

1) What is the default behaviour of Transformer wrt 
namespaces/namespace-prefixes? Where in the JAXP spec 
is it defined?

2) Can I query or modify SAX2 parser features for a JAXP Transformer
object?  If yes, how?

Thanks to anyone willing to get me out of the impasse.

Regards,
Nikolai Grigoriev
RenderX






 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.