You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Jens Muehlenhoff <el...@uni-paderborn.de> on 2000/03/15 22:04:16 UTC

Xerces-J 1.0.3: SAX Problem

Hello,

I read a xml-document with the SAX-interface of the Xerces-J 1.0.3
package. I wrote my own DeclHandler and in this interface I rewrite the
function elementDecl(String name,String model). If the parse reaches the
following line in my xml-dtd

<!ELEMENT Foundation.Core.Element (XMI.extension*)? >
                                  ^^^^^^^^^^^^^^^^^

the parameter 'model' contains then "XMI.extension*?"

I guess it should be "(XMI.extension*)?"

Is is a bug or a feature?


Bye 

Jens

-- 
**********************************************************************
* Jens Muehlenhoff                                                   *
*                                                                    *
* student of Computer Science                                        *
*                                                                    *
* University of Paderborn (Germany)                                  *
*                                                                    *
* e-mail: elrond@uni-paderborn.de                                    *
**********************************************************************


Re: Xerces-J 1.0.3: SAX Problem

Posted by Jens Muehlenhoff <el...@uni-paderborn.de>.
Hello Any,

On Thu, 16 Mar 2000, Andy Clark wrote:

> Jens Muehlenhoff wrote:
> > <!ELEMENT Foundation.Core.Element (XMI.extension*)? >
> >                                   ^^^^^^^^^^^^^^^^^
> > ... 
> I would call it a bug in your DTD. ;)

The orginal dtd is from

http://www.dstc.edu.au/Research/Projects/MOF/Publications/OMG/XMI/ad98-10-16.dtd

Prehaps they mad a mistake?

Bye 

Jens

--
**********************************************************************
* Jens Muehlenhoff                                                   *
*                                                                    *
* student of Computer Science                                        *
*                                                                    *
* University of Paderborn (Germany)                                  *
*                                                                    *
* e-mail: elrond@uni-paderborn.de                                    *
**********************************************************************


Re: Xerces-J 1.0.3: SAX Problem

Posted by Andy Clark <an...@apache.org>.
Jens Muehlenhoff wrote:
> <!ELEMENT Foundation.Core.Element (XMI.extension*)? >
>                                   ^^^^^^^^^^^^^^^^^
> 
> the parameter 'model' contains then "XMI.extension*?"
> 
> I guess it should be "(XMI.extension*)?"
> 
> Is is a bug or a feature?

I would call it a bug in your DTD. ;)

The model string is built from the internal structure of the
content model. So while your construction is allowed, it
yields strange results on the round-trip. I would suggest
that you change your declaration to the following:

 <!ELEMENT Foundation.Core.Element (XMI.extension*) >

Hmmm... is this a standard DTD for XMI?

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org