Search in sources :

Example 6 with XSAttGroupDecl

use of com.sun.xml.xsom.XSAttGroupDecl in project atlasmap by atlasmap.

the class SchemaWriter method attGroupDecl.

public void attGroupDecl(XSAttGroupDecl decl) {
    Iterator itr;
    println(MessageFormat.format("<attGroup name=\"{0}\">", decl.getName()));
    indent++;
    // TODO: wildcard
    itr = decl.iterateAttGroups();
    while (itr.hasNext()) dumpRef((XSAttGroupDecl) itr.next());
    itr = decl.iterateDeclaredAttributeUses();
    while (itr.hasNext()) attributeUse((XSAttributeUse) itr.next());
    indent--;
    println("</attGroup>");
}
Also used : XSAttGroupDecl(com.sun.xml.xsom.XSAttGroupDecl) Iterator(java.util.Iterator) XSAttributeUse(com.sun.xml.xsom.XSAttributeUse)

Example 7 with XSAttGroupDecl

use of com.sun.xml.xsom.XSAttGroupDecl in project atlasmap by atlasmap.

the class SchemaWriter method dumpComplexTypeAttribute.

private void dumpComplexTypeAttribute(XSComplexType type) {
    Iterator itr;
    itr = type.iterateAttGroups();
    while (itr.hasNext()) dumpRef((XSAttGroupDecl) itr.next());
    itr = type.iterateDeclaredAttributeUses();
    while (itr.hasNext()) attributeUse((XSAttributeUse) itr.next());
    XSWildcard awc = type.getAttributeWildcard();
    if (awc != null)
        wildcard("anyAttribute", awc, "");
}
Also used : XSAttGroupDecl(com.sun.xml.xsom.XSAttGroupDecl) Iterator(java.util.Iterator) XSAttributeUse(com.sun.xml.xsom.XSAttributeUse) XSWildcard(com.sun.xml.xsom.XSWildcard)

Example 8 with XSAttGroupDecl

use of com.sun.xml.xsom.XSAttGroupDecl in project atlasmap by atlasmap.

the class redefine method action0.

private void action0() throws SAXException {
    XSAttGroupDecl oldAg = $runtime.currentSchema.getAttGroupDecl(newAg.getName());
    if (oldAg == null) {
        $runtime.reportError(Messages.format(Messages.ERR_UNDEFINED_ATTRIBUTEGROUP, newAg.getName()));
    } else {
        newAg.redefine((AttGroupDeclImpl) oldAg);
        $runtime.currentSchema.addAttGroupDecl(newAg, true);
    }
}
Also used : XSAttGroupDecl(com.sun.xml.xsom.XSAttGroupDecl)

Aggregations

XSAttGroupDecl (com.sun.xml.xsom.XSAttGroupDecl)8 XSAttributeUse (com.sun.xml.xsom.XSAttributeUse)5 Iterator (java.util.Iterator)5 XSAttributeDecl (com.sun.xml.xsom.XSAttributeDecl)2 XSComplexType (com.sun.xml.xsom.XSComplexType)2 XSElementDecl (com.sun.xml.xsom.XSElementDecl)2 XSModelGroupDecl (com.sun.xml.xsom.XSModelGroupDecl)2 XSSimpleType (com.sun.xml.xsom.XSSimpleType)2 XSType (com.sun.xml.xsom.XSType)1 XSWildcard (com.sun.xml.xsom.XSWildcard)1 ArrayList (java.util.ArrayList)1