[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xerces-J XML Schema validation problem

  • To: xml-dev@l...
  • Subject: Xerces-J XML Schema validation problem
  • From: "Michail Papadopoulos" <el97658@m...>
  • Date: Wed, 5 May 2004 10:41:58 -0000

domparser getdocument
I'm trying to validate an xml file against a schema that references W3C 
reserved attributes, like xml:base or xml:lang. I'm using the DOMParser.parse
() method to parse the file. The problem is that Xerces seems to be unaware 
of these reserved attributes and tries to resolve the references to them, and 
so I get the following error message :

[ERROR]: src-resolve: Cannot resolve the name 'xml:base' to a(n) 'attribute 
declaration' component. line: 74, col: 36

Despite this error, calling the DOMParser.getDocument() method after the 
parse returns a Document object. This is confusing. If there were errors in 
the parse then why should this method return anything else than null? Even 
when the xml file contains elements that aren't declared in the schema, 
Xerces doesn't report them and the DOMParser.getDocument() still returns a 
Document object, as if everything was OK. Apparently Xerces stops validating 
the document after encountering the initial xml:base error.


The schema I'm using is the IMS Content Packaging Specification schema which 
can be found at 
http://www.imsglobal.org/content/packaging/cpv1p1p3/XMLschemas/imscp_v1p1.xsd

The xml:base reference in the schema is :

<xsd:attributeGroup name = "attr.base">
	<xsd:attribute ref = "xml:base"/>
</xsd:attributeGroup>

at line 73.

I would really appreciate some help.

P.S. I'm using Xerces 2.6.0



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.