本文整理了Java中org.apache.xalan.processor.XSLTElementDef
类的一些代码示例,展示了XSLTElementDef
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLTElementDef
类的具体详情如下:
包路径:org.apache.xalan.processor.XSLTElementDef
类名称:XSLTElementDef
[英]This class defines the allowed structure for an element in a XSLT stylesheet, is meant to reflect the structure defined in http://www.w3.org/TR/xslt#dtd, and the mapping between Xalan classes and the markup elements in the XSLT instance. This actually represents both text nodes and elements.
[中]此类定义XSLT样式表中元素的允许结构,旨在反映中定义的结构http://www.w3.org/TR/xslt#dtd,以及Xalan类和XSLT实例中的标记元素之间的映射。这实际上表示文本节点和元素。
代码示例来源:origin: robovm/robovm
if (!equalsMayBeNullOrZeroLen(uri, Constants.S_XSLNAMESPACEURL))
order = def.getOrder();
multiAllowed = def.getMultiAllowed();
else if (def.QNameEquals(uri, localName))
if (def.getRequired())
this.setRequiredFound(def.getName(), true);
order = def.getOrder();
multiAllowed = def.getMultiAllowed();
elemDef = def.m_elementProcessor;
break;
if (elemDef != null && this.isOrdered())
int lastOrder = getLastOrder();
if (order > lastOrder)
setLastOrder(order);
else if (order == lastOrder && !multiAllowed)
代码示例来源:origin: robovm/robovm
/**
* Construct an instance of XSLTElementDef.
*
* @param namespace The Namespace URI, "*", or null.
* @param name The local name (without prefix), "*", or null.
* @param nameAlias A potential alias for the name, or null.
* @param elements An array of allowed child element defs, or null.
* @param attributes An array of allowed attribute defs, or null.
* @param contentHandler The element processor for this element.
* @param classObject The class of the object that this element def should produce.
*/
XSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias,
XSLTElementDef[] elements, XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler, Class classObject)
{
build(namespace, name, nameAlias, elements, attributes, contentHandler,
classObject);
if ( (null != namespace)
&& (namespace.equals(Constants.S_XSLNAMESPACEURL)
|| namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)
|| namespace.equals(Constants.S_BUILTIN_OLD_EXTENSIONS_URL)))
{
schema.addAvailableElement(new QName(namespace, name));
if(null != nameAlias)
schema.addAvailableElement(new QName(namespace, nameAlias));
}
}
代码示例来源:origin: robovm/robovm
XSLTAttributeDef attrDef = def.getAttributeDef(attrUri, attrLocalName);
XSLTAttributeDef[] attrDefs = def.getAttributes();
int nAttrDefs = attrDefs.length;
代码示例来源:origin: robovm/robovm
this.m_attributes = attributes;
setElementProcessor(contentHandler);
if (hasRequired() && m_elements != null)
if (def != null && def.getRequired())
m_requiredFound.put(def.getName(), "xsl:" +def.getName());
代码示例来源:origin: robovm/robovm
XSLTAttributeDef[] attrDefs = getAttributes();
int nAttrDefs = attrDefs.length;
String nameDef = attrDef.getName();
if (nameDef.equals("*") && (equalsMayBeNullOrZeroLen(uri, uriDef) ||
(uriDef != null && uriDef.equals("*") && uri!=null && uri.length() > 0 )))
else if (equalsMayBeNullOrZeroLen(uri, uriDef)
&& localName.equals(nameDef))
if (uri.length() > 0 && !equalsMayBeNullOrZeroLen(uri, Constants.S_XSLNAMESPACEURL))
代码示例来源:origin: robovm/robovm
XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */, null, /* attributes */
new ProcessorCharacters(),
ElemTextLiteral.class /* class object */);
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef whiteSpaceOnly = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */,
null, /* attributes */
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef resultElement = new XSLTElementDef(this, null, "*",
null /*alias */,
templateElements /* elements */,
ElemLiteralResult.class /* class object */, 20, true);
XSLTElementDef unknownElement =
new XSLTElementDef(this, "*", "unknown", null /*alias */,
templateElementsAndParams /* elements */,
new XSLTAttributeDef[]{ xslExcludeResultPrefixesAttr,
new ProcessorUnknown(),
ElemUnknown.class /* class object */, 20, true);
XSLTElementDef xslValueOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "value-of",
null /*alias */, null /* elements */,
代码示例来源:origin: robovm/robovm
/**
* Receive notification of the start of an element.
*
* @param handler non-null reference to current StylesheetHandler that is constructing the Templates.
* @param uri The Namespace URI, or an empty string.
* @param localName The local name (without prefix), or empty string if not namespace processing.
* @param rawName The qualified name (with prefix).
* @param attributes The specified or defaulted attributes.
*/
public void startElement(
StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
throws org.xml.sax.SAXException
{
if (m_savedLastOrder == null)
m_savedLastOrder = new IntStack();
m_savedLastOrder.push(getElemDef().getLastOrder());
getElemDef().setLastOrder(-1);
}
代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1
XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */, null, /* attributes */
new ProcessorCharacters(),
ElemTextLiteral.class /* class object */);
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef whiteSpaceOnly = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */,
null, /* attributes */
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef resultElement = new XSLTElementDef(this, null, "*",
null /*alias */,
templateElements /* elements */,
ElemLiteralResult.class /* class object */, 20, true);
XSLTElementDef unknownElement =
new XSLTElementDef(this, "*", "unknown", null /*alias */,
templateElementsAndParams /* elements */,
new XSLTAttributeDef[]{ xslExcludeResultPrefixesAttr,
new ProcessorUnknown(),
ElemUnknown.class /* class object */, 20, true);
XSLTElementDef xslValueOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "value-of",
null /*alias */, null /* elements */,
代码示例来源:origin: robovm/robovm
Class classObject = def.getClassObject();
ElemTemplateElement elem = null;
代码示例来源:origin: robovm/robovm
/**
* Tell if the namespace URI and local name match this
* element.
* @param uri The namespace uri, which may be null.
* @param localName The local name of an element, which may be null.
*
* @return true if the uri and local name arguments are considered
* to match the uri and local name of this element def.
*/
private boolean QNameEquals(String uri, String localName)
{
return (equalsMayBeNullOrZeroLen(m_namespace, uri)
&& (equalsMayBeNullOrZeroLen(m_name, localName)
|| equalsMayBeNullOrZeroLen(m_nameAlias, localName)));
}
代码示例来源:origin: xalan/xalan
this.m_attributes = attributes;
setElementProcessor(contentHandler);
if (hasRequired() && m_elements != null)
if (def != null && def.getRequired())
m_requiredFound.put(def.getName(), "xsl:" +def.getName());
代码示例来源:origin: xalan/xalan
XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */, null, /* attributes */
new ProcessorCharacters(),
ElemTextLiteral.class /* class object */);
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef whiteSpaceOnly = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */,
null, /* attributes */
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef resultElement = new XSLTElementDef(this, null, "*",
null /*alias */,
templateElements /* elements */,
ElemLiteralResult.class /* class object */, 20, true);
XSLTElementDef unknownElement =
new XSLTElementDef(this, "*", "unknown", null /*alias */,
templateElementsAndParams /* elements */,
new XSLTAttributeDef[]{ xslExcludeResultPrefixesAttr,
new ProcessorUnknown(),
ElemUnknown.class /* class object */, 20, true);
XSLTElementDef xslValueOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "value-of",
null /*alias */, null /* elements */,
代码示例来源:origin: xalan/xalan
/**
* Receive notification of the start of an element.
*
* @param handler non-null reference to current StylesheetHandler that is constructing the Templates.
* @param uri The Namespace URI, or an empty string.
* @param localName The local name (without prefix), or empty string if not namespace processing.
* @param rawName The qualified name (with prefix).
* @param attributes The specified or defaulted attributes.
*/
public void startElement(
StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
throws org.xml.sax.SAXException
{
if (m_savedLastOrder == null)
m_savedLastOrder = new IntStack();
m_savedLastOrder.push(getElemDef().getLastOrder());
getElemDef().setLastOrder(-1);
}
代码示例来源:origin: xalan/xalan
XSLTAttributeDef[] attrDefs = getAttributes();
int nAttrDefs = attrDefs.length;
String nameDef = attrDef.getName();
if (nameDef.equals("*") && (equalsMayBeNullOrZeroLen(uri, uriDef) ||
(uriDef != null && uriDef.equals("*") && uri!=null && uri.length() > 0 )))
else if (equalsMayBeNullOrZeroLen(uri, uriDef)
&& localName.equals(nameDef))
if (uri.length() > 0 && !equalsMayBeNullOrZeroLen(uri, Constants.S_XSLNAMESPACEURL))
代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan
XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */, null, /* attributes */
new ProcessorCharacters(),
ElemTextLiteral.class /* class object */);
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef whiteSpaceOnly = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */,
null, /* attributes */
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef resultElement = new XSLTElementDef(this, null, "*",
null /*alias */,
templateElements /* elements */,
ElemLiteralResult.class /* class object */, 20, true);
XSLTElementDef unknownElement =
new XSLTElementDef(this, "*", "unknown", null /*alias */,
templateElementsAndParams /* elements */,
new XSLTAttributeDef[]{ xslExcludeResultPrefixesAttr,
new ProcessorUnknown(),
ElemUnknown.class /* class object */, 20, true);
XSLTElementDef xslValueOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "value-of",
null /*alias */, null /* elements */,
代码示例来源:origin: xalan/xalan
Class classObject = def.getClassObject();
ElemTemplateElement elem = null;
代码示例来源:origin: xalan/xalan
/**
* Tell if the namespace URI and local name match this
* element.
* @param uri The namespace uri, which may be null.
* @param localName The local name of an element, which may be null.
*
* @return true if the uri and local name arguments are considered
* to match the uri and local name of this element def.
*/
private boolean QNameEquals(String uri, String localName)
{
return (equalsMayBeNullOrZeroLen(m_namespace, uri)
&& (equalsMayBeNullOrZeroLen(m_name, localName)
|| equalsMayBeNullOrZeroLen(m_nameAlias, localName)));
}
代码示例来源:origin: xalan/xalan
if (!equalsMayBeNullOrZeroLen(uri, Constants.S_XSLNAMESPACEURL))
order = def.getOrder();
multiAllowed = def.getMultiAllowed();
else if (def.QNameEquals(uri, localName))
if (def.getRequired())
this.setRequiredFound(def.getName(), true);
order = def.getOrder();
multiAllowed = def.getMultiAllowed();
elemDef = def.m_elementProcessor;
break;
if (elemDef != null && this.isOrdered())
int lastOrder = getLastOrder();
if (order > lastOrder)
setLastOrder(order);
else if (order == lastOrder && !multiAllowed)
代码示例来源:origin: MobiVM/robovm
this.m_attributes = attributes;
setElementProcessor(contentHandler);
if (hasRequired() && m_elements != null)
if (def != null && def.getRequired())
m_requiredFound.put(def.getName(), "xsl:" +def.getName());
代码示例来源:origin: ibinti/bugvm
XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */, null, /* attributes */
new ProcessorCharacters(),
ElemTextLiteral.class /* class object */);
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef whiteSpaceOnly = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */,
null, /* attributes */
charData.setType(XSLTElementDef.T_PCDATA);
XSLTElementDef resultElement = new XSLTElementDef(this, null, "*",
null /*alias */,
templateElements /* elements */,
ElemLiteralResult.class /* class object */, 20, true);
XSLTElementDef unknownElement =
new XSLTElementDef(this, "*", "unknown", null /*alias */,
templateElementsAndParams /* elements */,
new XSLTAttributeDef[]{ xslExcludeResultPrefixesAttr,
new ProcessorUnknown(),
ElemUnknown.class /* class object */, 20, true);
XSLTElementDef xslValueOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "value-of",
null /*alias */, null /* elements */,
内容来源于网络,如有侵权,请联系作者删除!