/** * <p> * setSpecified * </p> * * @param arg0 * @param arg1 */ public void setSpecified( int arg0, boolean arg1 ) { attrs.setSpecified(arg0, arg1); } /**
/** * <p> * setSpecified * </p> * * @param arg0 * @param arg1 */ public void setSpecified( int arg0, boolean arg1 ) { attrs.setSpecified(arg0, arg1); } /**
newattrs.addAttribute(aqname, type, value); newattrs.setNonNormalizedValue(i, nonNormalizedValue); newattrs.setSpecified(i, specified);
/** Text declaration. */ public void textDecl(String version, String encoding, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); if (version != null) { fAttributes.addAttribute(A_VERSION, "CDATA", version); fAttributes.setSpecified(0, true); } fAttributes.addAttribute(A_ENCODING, "CDATA", encoding); fAttributes.setSpecified(version!=null?1:0, true); fDocumentHandler.emptyElement(E_TEXT_DECL, fAttributes, augs); } } // textDecl(String,String,Augmentations)
/** Element declaration. */ public void elementDecl(String ename, String model, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_ENAME, "NMTOKEN", ename); fAttributes.setSpecified(0, true); fAttributes.addAttribute(A_MODEL, "CDATA", model); fAttributes.setSpecified(1, true); fDocumentHandler.emptyElement(E_ELEMENT_DECL, fAttributes, augs); } } // elementDecl(String,String,Augmentations)
/** Internal entity declaration. */ public void internalEntityDecl(String name, XMLString value, XMLString nonvalue, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_NAME, "NMTOKEN", name); fAttributes.setSpecified(0, true); fAttributes.addAttribute(A_VALUE, "CDATA", value.toString()); fAttributes.setSpecified(1, true); fDocumentHandler.emptyElement(E_INTERNAL_ENTITY_DECL, fAttributes, augs); } } // internalEntityDecl(String,XMLString,XMLString,Augmentations)
/** Processing instruction. */ public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_TARGET, "NMTOKEN", target); fAttributes.setSpecified(0, true); fAttributes.addAttribute(A_DATA, "CDATA", data.toString()); fAttributes.setSpecified(1, true); fDocumentHandler.emptyElement(E_PROCESSING_INSTRUCTION, fAttributes, augs); } } // processingInstruction(String,XMLString,Augmentations)
/** Start attribute list. */ public void startAttlist(String ename, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_ENAME, "NMTOKEN", ename); fAttributes.setSpecified(0, true); fDocumentHandler.startElement(E_ATTLIST, fAttributes, augs); } } // startAttlist(String,Augmentations)
/** Separator in mixed or children content model. */ public void separator(short type, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { String groupType = type == SEPARATOR_CHOICE ? "|" : ","; fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_TYPE, "CDATA", groupType); fAttributes.setSpecified(0, true); fDocumentHandler.emptyElement(E_SEPARATOR, fAttributes, augs); } } // separator(short,Augmentations)
/** External entity declaration. */ public void externalEntityDecl(String name, XMLResourceIdentifier id, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_NAME, "NMTOKEN", name); fAttributes.setSpecified(0, true); String publicId = id.getPublicId(); if (publicId != null) { fAttributes.addAttribute(A_PUBID, "CDATA", publicId); fAttributes.setSpecified(1, true); } String systemId = id.getLiteralSystemId(); fAttributes.addAttribute(A_SYSID, "CDATA", systemId); fAttributes.setSpecified(publicId!=null?2:1, true); fDocumentHandler.emptyElement(E_EXTERNAL_ENTITY_DECL, fAttributes, augs); } } // externalEntityDecl(String,XMLResourceIdentifier,Augmentations)
/** Element reference in mixed or children content model. */ public void element(String name, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_NAME, "NMTOKEN", name); fAttributes.setSpecified(0, true); fDocumentHandler.emptyElement(E_ELEMENT, fAttributes, augs); } } // element(String,Augmentations)
/** Start conditional section. */ public void startConditional(short type, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { String conditional = type == CONDITIONAL_IGNORE ? "IGNORE" : "INCLUDE"; fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_TYPE, T_CONDITIONAL, conditional); fAttributes.setSpecified(0, true); fDocumentHandler.startElement(E_CONDITIONAL, fAttributes, augs); } } // startConditional(short,Augmentations)
/** Occurrence count in mixed or children content model. */ public void occurrence(short type, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { String occurs = type == OCCURS_ONE_OR_MORE ? "+" : type == OCCURS_ZERO_OR_MORE ? "*" : type == OCCURS_ZERO_OR_ONE ? "?" : null; fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_TYPE, "CDATA", occurs); fAttributes.setSpecified(0, true); fDocumentHandler.emptyElement(E_OCCURRENCE, fAttributes, augs); } } // occurrence(short,Augmentations)
/** Start content model. */ public void startContentModel(String ename, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_ENAME, "NMTOKEN", ename); fAttributes.setSpecified(0, true); fDocumentHandler.startElement(E_CONTENT_MODEL, fAttributes, augs); } } // startContentModel(String,Augmentations)
/** Notation declaration. */ public void notationDecl(String name, XMLResourceIdentifier id, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_NAME, "NMTOKEN", name); fAttributes.setSpecified(0, true); String publicId = id.getPublicId(); if (publicId != null) { fAttributes.addAttribute(A_PUBID, "CDATA", publicId); fAttributes.setSpecified(1, true); } String systemId = id.getLiteralSystemId(); if (systemId != null) { fAttributes.addAttribute(A_SYSID, "CDATA", systemId); fAttributes.setSpecified(publicId!=null?2:1, true); } fDocumentHandler.emptyElement(E_NOTATION_DECL, fAttributes, augs); } } // notationDecl(String,XMLResourceIdentifier,Augmentations)
/** Unparsed entity declaration. */ public void unparsedEntityDecl(String name, XMLResourceIdentifier id, String notation, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_NAME, "NMTOKEN", name); fAttributes.setSpecified(0, true); String publicId = id.getPublicId(); if (publicId != null) { fAttributes.addAttribute(A_PUBID, "CDATA", publicId); fAttributes.setSpecified(1, true); } String systemId = id.getLiteralSystemId(); if (systemId != null) { fAttributes.addAttribute(A_SYSID, "CDATA", systemId); fAttributes.setSpecified(publicId!=null?2:1, true); } fAttributes.addAttribute(A_NOTATION, "NMTOKEN", notation); fAttributes.setSpecified(fAttributes.getLength()-1, true); fDocumentHandler.emptyElement(E_UNPARSED_ENTITY_DECL, fAttributes, augs); } } // externalEntityDecl(String,XMLResourceIdentifier,String,Augmentations)
/** Start parameter entity. */ public void startParameterEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fAttributes.removeAllAttributes(); fAttributes.addAttribute(A_NAME, "CDATA", name); fAttributes.setSpecified(0, true); String publicId = id.getPublicId(); if (publicId != null) { fAttributes.addAttribute(A_PUBID, "CDATA", publicId); fAttributes.setSpecified(1, true); } String systemId = id.getLiteralSystemId(); if (systemId != null) { fAttributes.addAttribute(A_SYSID, "CDATA", systemId); fAttributes.setSpecified(publicId!=null?2:1, true); } fDocumentHandler.startElement(E_PARAMETER_ENTITY, fAttributes, augs); } } // startParameterEntity(String,XMLResourceIdentifier,String,Augmentations)
newattrs.addAttribute(aqname, type, value); newattrs.setNonNormalizedValue(i, nonNormalizedValue); newattrs.setSpecified(i, specified);
/** * 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)
newattrs.addAttribute(aqname, type, value); newattrs.setNonNormalizedValue(i, nonNormalizedValue); newattrs.setSpecified(i, specified);