Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anyURI validation failing in Xerces-J

Status
Not open for further replies.

DFielder

Programmer
Nov 10, 2005
1
0
0
US
I'm using the latest version of Xerces-J and parsing an XML file using the 'org.apache.xerces.parsers.SAXParser' parser. The problem I have is that a value such as 'file:///c:/#test#.jpg' is failing validation as xs:anyURI. What's interesting is that if I remove one of the pound signs, it validates just fine. The string with two pound signs validates with no problem in XMLSpy. Any ideas what's going on here? Here's the exact error coming out of the SAXParser:

[Error] test.xml:9:48: cvc-datatype-valid.1.2.1: 'file:///c:/#test#.jpg' is not a valid value for 'anyURI'
 
Check the encoding

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top