It may be that parser can not locate schema of xml you're parsing.
Make sure you have schema specified either in xml file itself or using one of the properties available.

Andrea Bigger wrote:
Hi.

In the W3C Recommendation I found following statement:

<< [...]. The fixed attribute is used in both attribute and element
declarations to ensure that the attributes and elements are set to
particular values. For example, po.xsd contains a declaration for the
country attribute, which is declared with a fixed value US. This
declaration means that the appearance of a country attribute in an instance
document is optional [...], although if the attribute does appear, its
value must be US, and if the attribute does not appear, the schema
processor will provide a country attribute with the value US.[...] >> (see
W3C Recommendation, 2 May 2001, XML Schema Part0)

First of all, does Xerces-J v2.x supports/implements this feature?

I'm currently using JDOM v1.0b8 on top of Xerces-J v2.4.0 and every time I
try to get a value of an unset attribute/value which should have a fixed
value, I get a null reference. JDOM uses a
org.apache.xerces.parsers.SAXParser, validation is enabled and feature
http://apache.org.xml.features/validation/schema is true.

The schema processor seams not to work properly. What could be wrong?

Thanks for help/hints.
Andrea Bigger



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

--

Maksym Kovalenko
Software Engineer
Marketswitch Corporation
http://www.marketswitch.com
108 Powers Court, Suite 225
Dulles, VA 20166
Phone: +1 (703) 444-6750 ext. 302
Fax: +1 (703) 444-6812

Reply via email to