.jaxb.xsom.3.0.1.source-code.attribute.rng Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xsom Show documentation
Show all versions of xsom Show documentation
XML Schema Object Model (XSOM) is a Java library that allows applications to easily parse XML Schema
documents and inspect information in them. It is expected to be useful for applications that need to take XML
Schema as an input.
private boolean form;
private boolean formSpecified = false;
private AttributeDeclImpl makeResult() {
if(type==null)
// type defaults to anySimpleType
type = $runtime.parser.schemaSet.anySimpleType;
if(!formSpecified) form = $runtime.attributeFormDefault;
// global attributes are always qualified
if(!isLocal) form = true;
String tns;
if(form==true) tns = $runtime.currentSchema.getTargetNamespace();
else tns = "";
// proper handling of anonymous types
return new AttributeDeclImpl( $runtime.document, tns, name,
annotation, locator, fa, isLocal,
$runtime.createXmlString(defaultValue),
$runtime.createXmlString(fixedValue),
type );
}
private Ref.SimpleType type;
formSpecified = true;
fa = (fa);
(null,AnnotationContext.ATTRIBUTE_DECL);
type = new DelayedRef.SimpleType(
$runtime, locator, $runtime.currentSchema, typeName );
private AttGroupDeclImpl result;
private Locator locator;
locator=$runtime.copyLocator();
fa = (fa);
(null,AnnotationContext.ATTRIBUTE_GROUP);
result = new AttGroupDeclImpl(
$runtime.document, annotation, locator, fa, name );
private Ref.Attribute decl;
private Locator wloc; // locator for wildcards
private Locator locator;
locator=$runtime.copyLocator();
use=null;
defaultValue=null;
fixedValue=null;
decl=null;
annotation=null;
decl = anonymousDecl;
attDeclName = new UName(
anonymousDecl.getTargetNamespace(),
anonymousDecl.getName());
defaultValue = null;
fixedValue = null;
decl = new DelayedRef.Attribute(
$runtime, locator, $runtime.currentSchema, attDeclName );
(null,AnnotationContext.ATTRIBUTE_USE);
fa = (null);
if("prohibited".equals(use))
owner.addProhibitedAttribute(attDeclName);
else
owner.addAttributeUse(attDeclName,
new AttributeUseImpl( $runtime.document, annotation,locator,fa,decl,
$runtime.createXmlString(defaultValue),
$runtime.createXmlString(fixedValue),
"required".equals(use)));
locator=$runtime.copyLocator();
(null,AnnotationContext.ATTRIBUTE_USE);
owner.addAttGroup(new DelayedRef.AttGroup(
$runtime, locator, $runtime.currentSchema, groupName ));
wloc = $runtime.copyLocator();
owner.setWildcard(wildcard);