Пример #1
0
 protected void processAttributeUse(XSDAttributeUse use, Node parentNode)
     throws RepositoryException {
   // Process the attribute declaration ...
   Node attributeDeclaration =
       processAttributeDeclaration(use.getAttributeDeclaration(), parentNode, true);
   if (use.getUse() != null) {
     attributeDeclaration.setProperty(XsdLexicon.USE, use.getUse().getLiteral());
   }
   processNonSchemaAttributes(use, attributeDeclaration);
 }
 public IXSDFragment getFragment(XSDToFragmentConfiguration config, String id, String name) {
   XSDAttributeUse attribute = (XSDAttributeUse) config.getXSDComponent();
   if (attribute != null && attribute.getAttributeDeclaration() != null) {
     XSDAttributeDeclaration resolvedAttribute =
         resolveXSDAttributeDeclaration(attribute.getAttributeDeclaration());
     XSDTypeDefinition typeDef = getXSDTypeDefinition(resolvedAttribute);
     IXSDAttributeFragment attributeFrag =
         new XSDAttributeFragment(id, resolvedAttribute.getName(), config);
     attributeFrag.setXSDTypeDefinition(typeDef);
     XSDToFragmentConfiguration attributeTypeConfig = new XSDToFragmentConfiguration();
     attributeTypeConfig.setXSDComponent(typeDef);
     attributeTypeConfig.setStyle(config.getStyle());
     attributeTypeConfig.setPartEncoding(config.getPartEncoding());
     attributeTypeConfig.setWSDLPartName(config.getWSDLPartName());
     IXSDFragment xsdFragment =
         getController()
             .getFragment(attributeTypeConfig, attributeFrag.genID(), resolvedAttribute.getName());
     attributeFrag.setXSDDelegationFragment(xsdFragment);
     return attributeFrag;
   }
   return getXSDDefaultFragment(config, id, name);
 }