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 "Espen Ø. Pedersen" <ep...@corena.no> on 2006/04/27 12:58:59 UTC

Notation problems: parser reports undeclared although it is declared in my schema

Hi There!

Need some help with a Notation problem:

As long as this line is in my xml the doument parses just fine:

<!NOTATION cgm PUBLIC '-//USA-DOD//NOTATION Computer Graphics Metafile//EN'>

I use Arbortext Editor as an editor, it removes the the line above and 
when reparsed I get the following parse error:

--
The notation "cgm" must be declared when referenced in the unparsed 
entity declaration for "A-CGM-GRAPHIC".
--

This might sound reasonable, but it's not, because the notation is 
declared in my schema like this:

<xs:notation name="cgm" public="-//USA-DOD//NOTATION Computer Graphics 
Metafile//EN"/>

I've tried validating the file in XMLSpy and it is quite happy and 
reports no errors.

Any ideas why xerces will not parse my doc?

I'm using Xerces 2.7.1 ....

-- 
Espen Ø. Pedersen


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


Re: Notation problems: parser reports undeclared although it is declared in my schema

Posted by "Espen Ø. Pedersen" <ep...@corena.no>.
Thanks for your answer :-)

I have tried to turn DTD validation off with:

((DocumentBuilderFactoryImpl) 
factory).setFeature("http://apache.org/xml/features/validation/schema", 
true); 
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
                         "http://www.w3.org/2001/XMLSchema");

But what you ar saying is that is still tries to validate against the 
DTD as well?

-Espen

Joseph Kesselman skrev:
> DTD validation occurs before schema validation. If the DTD references a
> notation, it must define that notation, independently of whether the schema
> defines it.
> 
> ______________________________________
> "... Three things are most perilous: Connectors that corrode,
>   Unproven algorithms, and self-modifying code! ..."
>   -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
> (http://www.ovff.org/pegasus/songs/threes-rev-11.html)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 

-- 
Espen Ø. Pedersen

Company: CORENA Norge AS
Address: Industritunet, Dyrmyrgt. 35, N-3611 Kongsberg
Phone:   +47 32 71 72 29
Skype:   no32717229
E-mail:  epe@corena.no

http://www.corena.com


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


Re: Notation problems: parser reports undeclared although it is declared in my schema

Posted by Joseph Kesselman <ke...@us.ibm.com>.
DTD validation occurs before schema validation. If the DTD references a
notation, it must define that notation, independently of whether the schema
defines it.

______________________________________
"... Three things are most perilous: Connectors that corrode,
  Unproven algorithms, and self-modifying code! ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html)


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