< prev index next >

src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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

@@ -77,11 +77,11 @@
     private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/";
 
     private final XPath xpath;
 
     /**
-     * Internalize all &lt;jaxb:bindings> customizations in the given forest.
+     * Internalize all {@code <jaxb:bindings>} customizations in the given forest.
      *
      * @return
      *      if the SCD support is enabled, the return bindings need to be applied
      *      after schema components are parsed.
      *      If disabled, the returned binding set will be empty.

@@ -140,56 +140,31 @@
 
         return scd;
     }
 
     /**
-     * Validates attributes of a &lt;jaxb:bindings> element.
-     */
-    private void validate( Element bindings ) {
-        NamedNodeMap atts = bindings.getAttributes();
-        for( int i=0; i<atts.getLength(); i++ ) {
-            Attr a = (Attr)atts.item(i);
-            if( a.getNamespaceURI()!=null )
-                continue;   // all foreign namespace OK.
-            if( a.getLocalName().equals("node") )
-                continue;
-            if( a.getLocalName().equals("schemaLocation"))
-                continue;
-            if( a.getLocalName().equals("scd") )
-                continue;
-
-            // enhancements
-            if( a.getLocalName().equals("required") ) //
-                continue;
-            if( a.getLocalName().equals("multiple") ) //
-                continue;
-
-            // TODO: flag error for this undefined attribute
-        }
-    }
-
-    /**
      * Determines the target node of the "bindings" element
      * by using the inherited target node, then put
      * the result into the "result" map and the "scd" map.
      *
      * @param inheritedTarget
      *      The current target node. This always exists, even if
      *      the user starts specifying targets via SCD (in that case
      *      this inherited target is just not going to be used.)
      * @param inheritedSCD
-     *      If the ancestor &lt;bindings> node specifies @scd to
+     *      If the ancestor {@code <bindings>} node specifies @scd to
      *      specify the target via SCD, then this parameter represents that context.
      */
     private void buildTargetNodeMap( Element bindings, @NotNull Node inheritedTarget,
                                      @Nullable SCDBasedBindingSet.Target inheritedSCD,
                                      Map<Element,List<Node>> result, SCDBasedBindingSet scdResult ) {
         // start by the inherited target
         Node target = inheritedTarget;
         ArrayList<Node> targetMultiple = null;
 
-        validate(bindings); // validate this node
+        // validate this node ?
+        // validate(bindings);
 
         boolean required = true;
         boolean multiple = false;
 
         if(bindings.getAttribute("required") != null) {

@@ -439,15 +414,15 @@
 
     /**
      * Moves the "decl" node under the "target" node.
      *
      * @param decl
-     *      A JAXB customization element (e.g., &lt;jaxb:class>)
+     *      A JAXB customization element (e.g., {@code <jaxb:class>})
      *
      * @param target
      *      XML Schema element under which the declaration should move.
-     *      For example, &lt;xs:element>
+     *      For example, {@code <xs:element>}
      */
     private void moveUnder( Element decl, Element target ) {
         Element realTarget = forest.logic.refineTarget(target);
 
         declExtensionNamespace( decl, target );
< prev index next >