/** * <p> * getName * </p> * * @param arg0 * @param arg1 */ public void getName( int arg0, QName arg1 ) { attrs.getName(arg0, arg1); } /**
/** * <p> * getName * </p> * * @param arg0 * @param arg1 */ public void getName( int arg0, QName arg1 ) { attrs.getName(arg0, arg1); } /**
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);
public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } fAttributes.getName(fIndex, fAttrName); return fEventFactory.createAttribute(fAttrName.prefix, fAttrName.uri != null ? fAttrName.uri : "", fAttrName.localpart, fAttributes.getValue(fIndex++)); }
attributes.getName(i, fAttrName); if (fAttrName.prefix.length() > 0) { fStreamWriter.writeAttribute(fAttrName.prefix,
private void evaluateAssertsFromAttributes(QName element, XMLAttributes attributes) throws Exception { for (int attrIdx = 0; attrIdx < attributes.getLength(); attrIdx++) { QName attrQname = new QName(); attributes.getName(attrIdx, attrQname); String attrValue = attributes.getValue(attrIdx); Augmentations attrAugs = attributes.getAugmentations(attrIdx); AttributePSVImpl attrPsvi = (AttributePSVImpl)attrAugs.getItem(Constants.ATTRIBUTE_PSVI); XSSimpleTypeDefinition attrSimpleType = (XSSimpleTypeDefinition) attrPsvi.getTypeDefinition(); if (attrSimpleType != null) { List attrAssertList = fXmlSchemaValidator.getAssertionValidator().getAssertsFromSimpleType(attrSimpleType); if (attrAssertList != null) { boolean isTypeDerivedFromList = isTypeDerivedFromSTList(attrSimpleType); boolean isTypeDerivedFromUnion = isTypeDerivedFromSTUnion(attrSimpleType); for (int assertIdx = 0; assertIdx < attrAssertList.size(); assertIdx++) { XSAssertImpl assertImpl = (XSAssertImpl)attrAssertList.get(assertIdx); assertImpl.setAttrName(attrQname.localpart); evaluateOneAssertionFromSimpleType(element, attrValue, attrAugs, attrSimpleType, isTypeDerivedFromList, isTypeDerivedFromUnion, assertImpl, true, attrQname); // evaluate assertions on itemType of xs:list XSSimpleTypeDefinition attrItemType = attrSimpleType.getItemType(); if (isTypeDerivedFromList && attrItemType != null) { evaluateAssertsFromItemTypeOfSTList(element, attrItemType, attrValue); } } } } } } // evaluateAssertsFromAttributes
private XMLAttributes getAttributesForCTA(XMLAttributes attributes, Vector inheritableAttrList) { XMLAttributes ctaAttributes = new XMLAttributesImpl(); // copy attributes from the original list of attributes for (int attrIndx = 0; attrIndx < attributes.getLength(); attrIndx++) { QName attrQName = new QName(); attributes.getName(attrIndx, attrQName); ctaAttributes.addAttribute(attrQName, attributes.getType(attrIndx), attributes.getValue(attrIndx)); } // add inherited attributes to the CTA attributes list for (int elemIndx = inheritableAttrList.size() - 1; elemIndx > -1; elemIndx--) { AttributePSVI inhAttrPsvi = (AttributePSVI) inheritableAttrList.elementAt(elemIndx); XSAttributeDeclaration inhrAttrDecl = inhAttrPsvi.getAttributeDeclaration(); // if an inherited attribute is not overridden by the current element, add it to the CTA attributes list if (!isInheritedAttributeOverridden(ctaAttributes, inhrAttrDecl)) { QName attrQName = new QName(); attrQName.setValues(null, inhrAttrDecl.getName(), inhrAttrDecl.getName(), inhrAttrDecl.getNamespace()); ctaAttributes.addAttribute(attrQName, null, inhAttrPsvi.getSchemaValue().getNormalizedValue()); } } return ctaAttributes; } // getAttributesForCTA
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);
/** * Creates an element information object. * <p> * <strong>Note:</strong> This constructor makes a copy of the element information. * * @param element The element qualified name. * @param attributes The element attributes. */ public Info(HTMLElements.Element element, QName qname, XMLAttributes attributes) { this.element = element; this.qname = new QName(qname); if (attributes != null) { int length = attributes.getLength(); if (length > 0) { QName aqname = new QName(); XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i); String nonNormalizedValue = attributes.getNonNormalizedValue(i); boolean specified = attributes.isSpecified(i); newattrs.addAttribute(aqname, type, value); newattrs.setNonNormalizedValue(i, nonNormalizedValue); newattrs.setSpecified(i, specified); } this.attributes = newattrs; } } } // <init>(HTMLElements.Element,QName,XMLAttributes)
/** * Creates an element information object. * <p> * <strong>Note:</strong> This constructor makes a copy of the element information. * * @param element The element qualified name. * @param attributes The element attributes. */ public Info(HTMLElements.Element element, QName qname, XMLAttributes attributes) { this.element = element; this.qname = new QName(qname); if (attributes != null) { int length = attributes.getLength(); if (length > 0) { QName aqname = new QName(); XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i); String nonNormalizedValue = attributes.getNonNormalizedValue(i); boolean specified = attributes.isSpecified(i); newattrs.addAttribute(aqname, type, value); newattrs.setNonNormalizedValue(i, nonNormalizedValue); newattrs.setSpecified(i, specified); } this.attributes = newattrs; } } } // <init>(HTMLElements.Element,QName,XMLAttributes)
final XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); final String type = attributes.getType(i); final String value = attributes.getValue(i);
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);
XMLAttributes newattrs = new XMLAttributesImpl(); for (int i = 0; i < length; i++) { attributes.getName(i, aqname); String type = attributes.getType(i); String value = attributes.getValue(i);