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 Bob Foster <bo...@objfac.com> on 2004/03/17 23:37:40 UTC

Bug parsing xhtml-strict schema

Xerces 2.6.0 reports an error in:

http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd

against this regex pattern (among others):

     <xs:restriction base="xs:string">
       <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)"/>
     </xs:restriction>

Xerces is complaining about the - that begins [-+]. Yet XML Schema Part 
2 http://www.w3.org/TR/xmlschema-2/#nt-charRange specifically allows a - 
to begin a positive character group.

I'm surprised Xerces gets this wrong on such a public example. Is there 
a version where this is fixed?

If not, can someone point to where the code that checks this is so I can 
temporarily fix it myself? Thanks.

Bob


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


Re: Bug parsing xhtml-strict schema

Posted by Bob Foster <bo...@objfac.com>.
Neil Delima wrote:
> Hi Bob,
> 
> Seems like this has changed in the schema specification errata.  See
> http://www.w3.org/2001/05/xmlschema-errata#E2-18.

Thanks very much! (Though I don't understand why this is an "Error" - 
looks like a spec change to me unless there was a real ambiguity and not 
just a need for lookahead.) I guess we'll just be going through a period 
where half the tools accept it and half reject it, but it's good to know 
Xerces is in the more up-to-date half.

Bob

> 
> 
> Bob Foster <bo...@objfac.com> wrote on 03/17/2004 05:37:40 PM:
> 
> 
>>Xerces 2.6.0 reports an error in:
>>
>>http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd
>>
>>against this regex pattern (among others):
>>
>>     <xs:restriction base="xs:string">
>>       <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)"/>
>>     </xs:restriction>
>>
>>Xerces is complaining about the - that begins [-+]. Yet XML Schema Part
>>2 http://www.w3.org/TR/xmlschema-2/#nt-charRange specifically allows a -
>>to begin a positive character group.
>>
>>I'm surprised Xerces gets this wrong on such a public example. Is there
>>a version where this is fixed?
>>
>>If not, can someone point to where the code that checks this is so I can
>>temporarily fix it myself? Thanks.
>>
>>Bob


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


Re: Bug parsing xhtml-strict schema

Posted by Neil Delima <nd...@ca.ibm.com>.



Hi Bob,

Seems like this has changed in the schema specification errata.  See
http://www.w3.org/2001/05/xmlschema-errata#E2-18.



Bob Foster <bo...@objfac.com> wrote on 03/17/2004 05:37:40 PM:

> Xerces 2.6.0 reports an error in:
>
> http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd
>
> against this regex pattern (among others):
>
>      <xs:restriction base="xs:string">
>        <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)"/>
>      </xs:restriction>
>
> Xerces is complaining about the - that begins [-+]. Yet XML Schema Part
> 2 http://www.w3.org/TR/xmlschema-2/#nt-charRange specifically allows a -
> to begin a positive character group.
>
> I'm surprised Xerces gets this wrong on such a public example. Is there
> a version where this is fixed?
>
> If not, can someone point to where the code that checks this is so I can
> temporarily fix it myself? Thanks.
>
> Bob
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.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