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 Alex Brown <al...@griffinbrown.co.uk> on 2002/05/10 15:21:39 UTC
simplifying occurrence indicators
The SAX documentation states that, for the elementDecl method the content
model returned may need to have its occurence indicators 'simplified'.
Xerces will return content models with things like '??' and '*?' in them.
I'm not sure whether this needs to be 'simplified' or 'corrected', but in
either case does anybody have (or know of) code to fix this?
(This is using Xerces 1.4.4. on Windows and the content model in question is
that for the Product element in the ONIX International DTD at
http://www.editeur.org).
Any help much appreciated.
- Alex.
------------------------------------
Alex Brown
Technical Director
Griffin Brown Digital Publishing Ltd
Orwell House
Cowley Road
Cambridge
CB4 0PP
United Kingdom
Tel +44(1223)425730
FAX +44(1223)425384
Web http://www.griffinbrown.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: dumb simple data types question
Posted by Robert Buck <rb...@mathworks.com>.
Sorry for the confusion. It turns out that the example that I have been
basing some of my code upon (SEnumVal) actually spits out the wrong string
values instead of using the schema symbols constants.
Sorry about that. I am updating my source to use the schema symbols
constants instead.
Bob
At 02:38 PM 5/28/2002 -0400, you wrote:
>Bob,
>
>I am little bit confused. Xerces-C has the datatype string constants in
>SchemaSymbols as defined in the spec (i.e. fgDT_DECIMAL = "decimal").
>Xerces-C does not have 'Decimal' as a string constant. However, Decimal is an
>enumeration value (ValidatorType) in DatatypeValidator.
>
>Khaled
>
>Robert Buck wrote:
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: dumb simple data types question
Posted by Khaled Noaman <kn...@ca.ibm.com>.
Bob,
I am little bit confused. Xerces-C has the datatype string constants in
SchemaSymbols as defined in the spec (i.e. fgDT_DECIMAL = "decimal").
Xerces-C does not have 'Decimal' as a string constant. However, Decimal is an
enumeration value (ValidatorType) in DatatypeValidator.
Khaled
Robert Buck wrote:
> It seems to me that several other XML parsers (SAX or DOM), even Xerces-J,
> use string constants for the primitive data types. And those other
> implementations seem to use the names as indicated by the XML Schema
> specification. But in Xerces-C different names are used. For instance,
> instead of "decimal", Xerces-C uses "Decimal". There are several other
> cases too.
>
> Is there any reason why someone did this? Would there be an opposition to
> changing Xerces to be consistent with the names in the XML Schema spec? It
> just seems that Xerces-C is the odd-ball implementation out there, with
> everyone else standardizing on the names presented by the W3.
>
> I am layering my application in such a way that will enable me to swap out
> Xerces-C for any other parser (perhaps Xerces-J). And I could just compare
> strings ignoring case, but to be painfully picky, "Decimal" is different
> from "decimal".
>
> Does anyone else have any thoughts on the matter?
>
> Bob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
dumb simple data types question
Posted by Robert Buck <rb...@mathworks.com>.
It seems to me that several other XML parsers (SAX or DOM), even Xerces-J,
use string constants for the primitive data types. And those other
implementations seem to use the names as indicated by the XML Schema
specification. But in Xerces-C different names are used. For instance,
instead of "decimal", Xerces-C uses "Decimal". There are several other
cases too.
Is there any reason why someone did this? Would there be an opposition to
changing Xerces to be consistent with the names in the XML Schema spec? It
just seems that Xerces-C is the odd-ball implementation out there, with
everyone else standardizing on the names presented by the W3.
I am layering my application in such a way that will enable me to swap out
Xerces-C for any other parser (perhaps Xerces-J). And I could just compare
strings ignoring case, but to be painfully picky, "Decimal" is different
from "decimal".
Does anyone else have any thoughts on the matter?
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: simplifying occurrence indicators
Posted by Tinny Ng <tn...@ca.ibm.com>.
We don't have Xerces 1.4.4. Are you using Xerces-J? If so, please direct
your question to xerces-j-dev@xml.apache.org
----- Original Message -----
From: "Alex Brown" <al...@griffinbrown.co.uk>
To: <xe...@xml.apache.org>
Sent: Friday, May 10, 2002 9:21 AM
Subject: simplifying occurrence indicators
>
> The SAX documentation states that, for the elementDecl method the content
> model returned may need to have its occurence indicators 'simplified'.
>
> Xerces will return content models with things like '??' and '*?' in them.
> I'm not sure whether this needs to be 'simplified' or 'corrected', but in
> either case does anybody have (or know of) code to fix this?
>
> (This is using Xerces 1.4.4. on Windows and the content model in question
is
> that for the Product element in the ONIX International DTD at
> http://www.editeur.org).
>
> Any help much appreciated.
>
> - Alex.
>
> ------------------------------------
> Alex Brown
> Technical Director
>
> Griffin Brown Digital Publishing Ltd
> Orwell House
> Cowley Road
> Cambridge
> CB4 0PP
> United Kingdom
>
> Tel +44(1223)425730
> FAX +44(1223)425384
> Web http://www.griffinbrown.co.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org