You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Oleg <ol...@configurecode.com> on 2004/04/26 13:24:51 UTC

SAXNotRecognizedException on http://xml.org/sax/features/namespace-prefixes

Dear Distinguished Colleagues:

I am having a number of schema validation problems with Xerces, but 
let's discuss them one at a time.

The first problem is this.

I have a constant defined:

protected static final String FEATURE_NAMESPACE_PREFIXES = 
"http://xml.org/sax/features/namespace-prefixes";
	
I then use DOMParser:

  parser.setFeature(FEATURE_NAMESPACE_PREFIXES, true);

and get:

org.xml.sax.SAXNotRecognizedException: 
http://xml.org/sax/features/namespace-prefixes
	at org.apache.xerces.parsers.DOMParser.setFeature(Unknown Source)

(stack track truncated)

Is it a bug in Xerces or am I doing something wrong?

Note that setting the same feature on the SAXParser works fine.

Any thoughts ?

Regards,
Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: SAXNotRecognizedException on http://xml.org/sax/features/namespace-prefixes

Posted by Michael Glavassevich <mr...@apache.org>.
On Mon, 26 Apr 2004, Oleg wrote:

<snip/>

> Is it a bug in Xerces or am I doing something wrong?
>
> Note that setting the same feature on the SAXParser works fine.
>
> Any thoughts ?

It's not a bug. The DOM parser doesn't support that feature, nor is it
required to. Only the SAX parser does [1]. Once DOM Level 3 moves into the
standard distribution, you will be able to control this behaviour with the
"namespace-declarations" parameter [2]. Setting it to false isn't
supported yet.

> Regards,
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org

[1] http://xml.apache.org/xerces2-j/features.html#namespace-prefixes
[2] http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-namespace-declarations

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org