[jdom-interest] Schema aware parsing bug

Michael Kay mike at saxonica.com
Mon Oct 5 07:00:50 PDT 2015


I don’t think your interpretation of “fixed” is correct.

XML Schema part 1, section 3.2.1: "fixed indicates that the attribute value if present must equal the supplied constraint value, and if absent receives the supplied value as for default.”

Michael Kay
Saxonica

> On 5 Oct 2015, at 14:31, Thomas Scheffler <thomas.scheffler at uni-jena.de> wrote:
> 
> Hi,
> 
> I try to parse a document schema aware. There is an attribute defined as fixed="yes". Even if the attribute is not present in the source, it will be present in the JDOM Element. This should be the behavior of default="yes" if the attribute is not present.
> Semantically the fixed='yes' means the default is 'no' if the attribute is not present.
> This has currently a huge impact we have @invalid='yes' fixed by a 3rd party schema.
> 
> I use Oracle JAVA 1.8.0_51 and put a simple test to show the error in the attachment. Hope that it can be fixed soon...
> 
> regards,
> 
> Thomas
> <SchemaBug.java><schemabug.xml><schemabug.xsd>_______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com




More information about the jdom-interest mailing list