Hi Ajay, The lexical space of xs:anyURI [1] is much larger than the RFC 2396 definition for URIs. Characters not normally allowed in URIs are to be treated as if they were escaped with %nn sequences and that includes '|'. Both Xerces and the other validator you were using have the correct behaviour.
Thanks. [1] http://www.w3.org/TR/xmlschema-2/#anyURI Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com. E-mail: mrgla...@apache.org ajay bhadauria <abhadau...@yahoo.com> wrote on 09/07/2010 09:22:15 AM: > Hi All, > > When we used anyURI in the schema then any character is allowed in > the xml messgage for URI validation ? > > We are currently useing xalan-java2.7.1 with xerces-java 2.9.0. > Earlier we were using Tibco validator which uses crimson parser > which failed for the > same. > > Please help me to understand this since we are new user of xalan.2.7.1. > > Thanks a lot > Ajay > > --- On Fri, 9/3/10, ajay bhadauria <abhadau...@yahoo.com> wrote: > > > From: ajay bhadauria <abhadau...@yahoo.com> > > Subject: xsd:anyURI puzzle > > To: j-users@xerces.apache.org > > Date: Friday, September 3, 2010, 11:23 PM > > Hi, > > > > I am using xalan 2.7.1 for xml schema validation > > and I have schema with below grammer > > > > <xsd:simpleContent> > > <xsd:extension base="Scheme"> > > <xsd:attribute > > name="messageIdScheme" type="xsd:anyURI" > > use="required"/> > > </xsd:extension> > > </xsd:simpleContent> > > > > and my xml message is below > > > > <fpml:header> > > <fpml:messageId > > messageIdScheme="www|somesite.com">stringString</fpml:messageId> > > <fpml:sentBy>stringString</fpml:sentBy> > > <fpml:creationTimestamp>2007-01-01T01:01:01</fpml:creationTimestamp> > > </fpml:header> > > > > Apache xerces parser is validating successfully though "|" > > is not valid character in URI. > > > > Please help me in this why Apache parser is behaving like > > this > > > > Thanks > > Ajay > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > > For additional commands, e-mail: j-users-h...@xerces.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org