Java源码示例:com.sun.org.apache.xml.internal.serializer.ElemDesc
示例1
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例2
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例3
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例4
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例5
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例6
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例7
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例8
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例9
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例10
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例11
/**
* Return the ElemDesc object for an HTML element.
* Return null if the output method is not HTML or this is not a
* valid HTML element.
*/
public ElemDesc getElemDesc() {
if (isHTMLOutput()) {
return ToHTMLStream.getElemDesc(_name);
}
else
return null;
}
示例12
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例13
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例14
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例15
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例16
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例17
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例18
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例19
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例20
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例21
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}
示例22
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// push handler
il.append(methodGen.loadHandler());
// push attribute name - namespace prefix set by parent node
il.append(new PUSH(cpg, _name));
// push attribute value
_value.translate(classGen, methodGen);
// Generate code that calls SerializationHandler.addUniqueAttribute()
// if all attributes are unique.
SyntaxTreeNode parent = getParent();
if (parent instanceof LiteralElement
&& ((LiteralElement)parent).allAttributesUnique()) {
int flags = 0;
boolean isHTMLAttrEmpty = false;
ElemDesc elemDesc = ((LiteralElement)parent).getElemDesc();
// Set the HTML flags
if (elemDesc != null) {
if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTREMPTY)) {
flags = flags | SerializationHandler.HTML_ATTREMPTY;
isHTMLAttrEmpty = true;
}
else if (elemDesc.isAttrFlagSet(_name, ElemDesc.ATTRURL)) {
flags = flags | SerializationHandler.HTML_ATTRURL;
}
}
if (_value instanceof SimpleAttributeValue) {
String attrValue = ((SimpleAttributeValue)_value).toString();
if (!hasBadChars(attrValue) && !isHTMLAttrEmpty) {
flags = flags | SerializationHandler.NO_BAD_CHARS;
}
}
il.append(new PUSH(cpg, flags));
il.append(methodGen.uniqueAttribute());
}
else {
// call attribute
il.append(methodGen.attribute());
}
}