You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by ro...@us.ibm.com on 2000/04/20 19:54:09 UTC
Re: Resend - can ELEMENTS reference ENTITIES?
The C++ parser seems to have this problem as well. The deal is that the
parser always has to be looking for PE refs, and probably neither of us
managed to add a check at that point. So we see the % and freak out because
we aren't expected a PE ref there. This should probably be filed as a bug
again both parsers (I'm assuming since you reported it against the Java
parser that it exists there, and we saw it for the first time the other day
against the C++ one while testing something else.)
----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
roddey@us.ibm.com
"Watson, Tom" <To...@schwab.com> on 04/20/2000 10:25:04 AM
Please respond to xerces-dev@xml.apache.org
To: "'xerces-dev@xml.apache.org'" <xe...@xml.apache.org>
cc:
Subject: Resend - can ELEMENTS reference ENTITIES?
<<sorry, don't seem to be subscribed to xerces-j-dev yet>>
Master,
I am having some trouble with enumeration in XML.
Rather than doing this,
<!ELEMENT TxnCode (BUY|SELL|DEP|INT)>
I need to do the following, but it seems to be invalid,
<!ENTITY % validCode "BUY|SELL|DEP|INT">
<!ELEMENT TxnCode (%validCode;)>
This type of syntax is available for ATTLIST, but what about
ELEMENT? I can't carry this value as an attribute in my application
and I want my elements to make use of the Entity/Enum features.
this would also allow me to change my enums in one place.
Grasshopper
Re: Resend - can ELEMENTS reference ENTITIES?
Posted by Radovan Chytracek <Ra...@cern.ch>.
I use the following without problem neither with C++ parser XML4C 2.3.1 or
with the latest
CVS snapshot of Xerces-C at xml.apache.org:
<!ENTITY % elems "detelem | logvol | material">
<!--XML root element, transient root as well-->
<!ELEMENT DDDB (catalog | catalogref | %elems;)+>
roddey@us.ibm.com wrote:
>
> The C++ parser seems to have this problem as well. The deal is that the
> parser always has to be looking for PE refs, and probably neither of us
> managed to add a check at that point. So we see the % and freak out because
> we aren't expected a PE ref there. This should probably be filed as a bug
> again both parsers (I'm assuming since you reported it against the Java
> parser that it exists there, and we saw it for the first time the other day
> against the C++ one while testing something else.)
> To: "'xerces-dev@xml.apache.org'" <xe...@xml.apache.org>
> cc:
> Subject: Resend - can ELEMENTS reference ENTITIES?
>
> <<sorry, don't seem to be subscribed to xerces-j-dev yet>>
>
> Master,
>
> I am having some trouble with enumeration in XML.
>
> Rather than doing this,
>
> <!ELEMENT TxnCode (BUY|SELL|DEP|INT)>
>
> I need to do the following, but it seems to be invalid,
>
> <!ENTITY % validCode "BUY|SELL|DEP|INT">
>
> <!ELEMENT TxnCode (%validCode;)>
>
> This type of syntax is available for ATTLIST, but what about
> ELEMENT? I can't carry this value as an attribute in my application
> and I want my elements to make use of the Entity/Enum features.
>
> this would also allow me to change my enums in one place.
>
> Grasshopper
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
--
Radovan Chytracek LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch WWW: http://home.cern.ch/~chytrace
phone: +41 22 76 72486
Re: Resend - can ELEMENTS reference ENTITIES?
Posted by Radovan Chytracek <Ra...@cern.ch>.
I use the following without problem neither with C++ parser XML4C 2.3.1 or
with the latest
CVS snapshot of Xerces-C at xml.apache.org:
<!ENTITY % elems "detelem | logvol | material">
<!--XML root element, transient root as well-->
<!ELEMENT DDDB (catalog | catalogref | %elems;)+>
roddey@us.ibm.com wrote:
>
> The C++ parser seems to have this problem as well. The deal is that the
> parser always has to be looking for PE refs, and probably neither of us
> managed to add a check at that point. So we see the % and freak out because
> we aren't expected a PE ref there. This should probably be filed as a bug
> again both parsers (I'm assuming since you reported it against the Java
> parser that it exists there, and we saw it for the first time the other day
> against the C++ one while testing something else.)
> To: "'xerces-dev@xml.apache.org'" <xe...@xml.apache.org>
> cc:
> Subject: Resend - can ELEMENTS reference ENTITIES?
>
> <<sorry, don't seem to be subscribed to xerces-j-dev yet>>
>
> Master,
>
> I am having some trouble with enumeration in XML.
>
> Rather than doing this,
>
> <!ELEMENT TxnCode (BUY|SELL|DEP|INT)>
>
> I need to do the following, but it seems to be invalid,
>
> <!ENTITY % validCode "BUY|SELL|DEP|INT">
>
> <!ELEMENT TxnCode (%validCode;)>
>
> This type of syntax is available for ATTLIST, but what about
> ELEMENT? I can't carry this value as an attribute in my application
> and I want my elements to make use of the Entity/Enum features.
>
> this would also allow me to change my enums in one place.
>
> Grasshopper
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
--
Radovan Chytracek LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch WWW: http://home.cern.ch/~chytrace
phone: +41 22 76 72486