< prev index next >

src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 43,54 **** /** * Checks if binding declarations are placed where they are allowed. * * <p> ! * For example, if a &lt;jaxb:property> customization is given under ! * the &lt;xs:simpleContent> element, this class raises an error. * * <p> * our main checkpoint of misplaced customizations are in BGMBuilder. * There, we mark a customization whenever we use it. At the end of the * day, we look for unmarked customizations and raise errors for them. --- 43,54 ---- /** * Checks if binding declarations are placed where they are allowed. * * <p> ! * For example, if a {@code <jaxb:property>} customization is given under ! * the {@code <xs:simpleContent>} element, this class raises an error. * * <p> * our main checkpoint of misplaced customizations are in BGMBuilder. * There, we mark a customization whenever we use it. At the end of the * day, we look for unmarked customizations and raise errors for them.
*** 58,68 **** * the spec allows/prohibits customizations at schema element level, * while BGMBuilder and XSOM works on schema component levels. * * <p> * For example, a property customization is allowed on a complex type ! * schema component, but it's only allowed on the &lt;complexType> * element. The spec team informed us that they would consider resolving * this discrepancy in favor of RI, but meanwhile we need to detect * errors correctly. * * <p> --- 58,68 ---- * the spec allows/prohibits customizations at schema element level, * while BGMBuilder and XSOM works on schema component levels. * * <p> * For example, a property customization is allowed on a complex type ! * schema component, but it's only allowed on the {@code <complexType>} * element. The spec team informed us that they would consider resolving * this discrepancy in favor of RI, but meanwhile we need to detect * errors correctly. * * <p>
*** 92,104 **** * Components marked with '*' needs a check by this component * since more than one schema element corresponds to one schema component * of that type. * * <p> ! * For simple types, customizations are allowed only under the &lt;xs:simpleType> * element, and for complex types they are allowed only under the ! * &lt;xs:cimplexType> element. * * <p> * So the bottom line is that it would be suffice if we just make sure * that no customization will be attached under other elements of * simple types and complex types. Those are: --- 92,104 ---- * Components marked with '*' needs a check by this component * since more than one schema element corresponds to one schema component * of that type. * * <p> ! * For simple types, customizations are allowed only under the {@code <xs:simpleType>} * element, and for complex types they are allowed only under the ! * {@code <xs:cimplexType>} element. * * <p> * So the bottom line is that it would be suffice if we just make sure * that no customization will be attached under other elements of * simple types and complex types. Those are:
< prev index next >