[ http://issues.apache.org/jira/browse/XERCESC-1512?page=all ]
Grant Slade updated XERCESC-1512: --------------------------------- Attachment: vxml-datatypes.xsd grammar-core.xsd xml.xsd I have uploaded the complete vxml-datatypes.xsd, grammar-core.xsd and associated xml.xsd. You will notice that grammar-core.xsd contains 'Repeat-prob.datatype', 'Repeat.datatype' and 'Weight.datatype' which contain multiple pattern definitions. The following snippet of a grammar failed with the following error: Datatype error: Type:InvalidDatatypeValueException, Message:Value '1-10' does not match regular expression facet '[0-9]+|[0-9]+-([0-9]+)?|([0-9]+)?-[0-9]+' This is for the <item repeat="1-10"> which uses the 'Repeat.datatype' from the schema. <grammar mode="dtmf" version="1.0" root="digits" type="application/srgs+xml"> <rule id="digits" scope="public"> <item repeat="1-10"> <one-of> <item> 0 </item> <item> 1 </item> <item> 2 </item> <item> 3 </item> <item> 4 </item> <item> 5 </item> <item> 6 </item> <item> 7 </item> <item> 8 </item> <item> 9 </item> </one-of> </item> </rule> </grammar> An example from vxml-datatypes.xsd is where a variable is assigned a value eg. <var name="errs" expr="0"/> This produces the following error as it uses the 'RestrictedVariableName.datatype' patterns: Datatype error: Type:InvalidDatatypeValueException, Message:Value 'errs' does not match regular expression facet '([a-zA-Z]|[a-zA-Z$][a-zA-Z0-9_$]*[a-zA-Z0-9_]) Note only a single character is currently passable for this pattern !! Hope this is enough details Thanks for your assistance > Bad XS:pattern interpretation for XSD > ------------------------------------- > > Key: XERCESC-1512 > URL: http://issues.apache.org/jira/browse/XERCESC-1512 > Project: Xerces-C++ > Type: Bug > Components: Validating Parser (Schema) (Xerces 1.5 or up only) > Versions: 2.6.0 > Environment: Windows 2000 SP4, VC 6 SP4 used to compiled the xerces > libraries (C++ & Perl). > I call the Xerces library from perl with the XML::Xerces - perl glue library > Reporter: Olivier Quintens > Assignee: Alberto Massari > Attachments: grammar-core.xsd, vxml-datatypes.xsd, xml.xsd > > Hi, > The code validates xml messages against a enterprise standard XSD. > The following structure defines the tag validation > <xs:element name="ENTRY_TIME_STAMP" type="typeDateSeconds" minOccurs="0"/> > ..... > <xs:simpleType name="typeDateSeconds"> > <xs:restriction base="xs:string"> > <xs:pattern value="[0-9]{14}|[0-9]{16}"/> > </xs:restriction> > </xs:simpleType> > When the tag ENTRY_TIME_STAMP contains a value which match the first part > ([0-9]{14}), the xml is considered as valid. > e.g : <ENTRY_TIME_STAMP>20051006082856</ENTRY_TIME_STAMP> > When the tag ENTRY_TIME_STAMP contains a value which match the first part > ([0-9]{16}), the validator parser failed > e.g : <ENTRY_TIME_STAMP>2005100608285631</ENTRY_TIME_STAMP> > Threturn error is like > Reason : > ERROR: > FILE: FAKE_SYSTEM_ID > LINE: 1 > COLUMN: 211 > MESSAGE: Datatype error: Type:InvalidDatatypeValueException, Message:Value > '2005100608285631' does not match regular expression facet > '([0-9]{14}|[0-9]{16})'. > Cheers > Olivier -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]