本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.TransletException类的典型用法代码示例。如果您正苦于以下问题:Java TransletException类的具体用法?Java TransletException怎么用?Java TransletException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TransletException类属于com.sun.org.apache.xalan.internal.xsltc包,在下文中一共展示了TransletException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: lookupNamespace
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Lookup a namespace URI from a prefix starting at node. This method
* is used in the execution of xsl:element when the prefix is not known
* at compile time.
*/
public String lookupNamespace(int node, String prefix)
throws TransletException
{
int anode, nsnode;
final AncestorIterator ancestors = new AncestorIterator();
if (isElement(node)) {
ancestors.includeSelf();
}
ancestors.setStartNode(node);
while ((anode = ancestors.next()) != DTM.NULL) {
final NamespaceIterator namespaces = new NamespaceIterator();
namespaces.setStartNode(anode);
while ((nsnode = namespaces.next()) != DTM.NULL) {
if (getLocalName(nsnode).equals(prefix)) {
return getNodeValue(nsnode);
}
}
}
BasisLibrary.runTimeError(BasisLibrary.NAMESPACE_PREFIX_ERR, prefix);
return null;
}
示例2: makeNodeSortRecord
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Create an instance of a sub-class of NodeSortRecord. The name of this
* sub-class is passed to us in the constructor.
*/
public NodeSortRecord makeNodeSortRecord(int node, int last)
throws ExceptionInInitializerError,
LinkageError,
IllegalAccessException,
InstantiationException,
SecurityException,
TransletException {
try {
final NodeSortRecord sortRecord;
//NodeSortRecord subclasses are generated with a public empty constructor
// refer to com.sun.org.apache.xalan.internal.xsltc.compiler.Sort::compileInit
sortRecord = (NodeSortRecord)_class.getConstructor().newInstance();
sortRecord.initialize(node, last, _dom, _sortSettings);
return sortRecord;
} catch (NoSuchMethodException | IllegalArgumentException |
InvocationTargetException ex) {
throw new InstantiationException(ex.getMessage());
}
}
示例3: shallowCopy
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public String shallowCopy(final int node, SerializationHandler handler)
throws TransletException
{
if (_enhancedDOM != null) {
return _enhancedDOM.shallowCopy(node, handler);
}
else {
return _dom.shallowCopy(node, handler);
}
}
示例4: characters
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public void characters(final int textNode, SerializationHandler handler)
throws TransletException
{
if (_enhancedDOM != null) {
_enhancedDOM.characters(textNode, handler);
}
else {
_dom.characters(textNode, handler);
}
}
示例5: makeNodeSortRecord
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Create an instance of a sub-class of NodeSortRecord. The name of this
* sub-class is passed to us in the constructor.
*/
public NodeSortRecord makeNodeSortRecord(int node, int last)
throws ExceptionInInitializerError,
LinkageError,
IllegalAccessException,
InstantiationException,
SecurityException,
TransletException {
final NodeSortRecord sortRecord =
(NodeSortRecord)_class.newInstance();
sortRecord.initialize(node, last, _dom, _sortSettings);
return sortRecord;
}
示例6: copy
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public void copy(final int node, SerializationHandler handler)
throws TransletException
{
if (_dom != null) {
_dom.copy(node, handler);
}
else {
super.copy(node, handler);
}
}
示例7: shallowCopy
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public String shallowCopy(final int node, SerializationHandler handler)
throws TransletException
{
if (_dom != null) {
return _dom.shallowCopy(node, handler);
}
else {
return super.shallowCopy(node, handler);
}
}
示例8: characters
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Dispatch the character content of a node to an output handler.
*
* The escape setting should be taken care of when outputting to
* a handler.
*/
public void characters(final int node, SerializationHandler handler)
throws TransletException
{
if (_dom != null) {
_dom.characters(node, handler);
}
else {
super.characters(node, handler);
}
}
示例9: lookupNamespace
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public String lookupNamespace(int node, String prefix)
throws TransletException
{
if (_dom != null) {
return _dom.lookupNamespace(node, prefix);
}
else {
return super.lookupNamespace(node, prefix);
}
}
示例10: characters
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Copy the string value of a node directly to an output handler
*/
public void characters(final int node, SerializationHandler handler)
throws TransletException
{
if (node != DTM.NULL) {
try {
dispatchCharactersEvents(node, handler, false);
} catch (SAXException e) {
throw new TransletException(e);
}
}
}
示例11: copy
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Copy a node-set to an output handler
*/
public void copy(DTMAxisIterator nodes, SerializationHandler handler)
throws TransletException
{
int node;
while ((node = nodes.next()) != DTM.NULL) {
copy(node, handler);
}
}
示例12: copyPI
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Copies a processing instruction node to an output handler
*/
private void copyPI(final int node, SerializationHandler handler)
throws TransletException
{
final String target = getNodeName(node);
final String value = getStringValueX(node);
try {
handler.processingInstruction(target, value);
} catch (Exception e) {
throw new TransletException(e);
}
}
示例13: documentF
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
/**
* Interprets the arguments passed from the document() function (see
* com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an
* iterator containing the requested nodes. Builds a union-iterator if
* several documents are requested.
* 2 arguments arg1 and arg2. document(Obj, node-set) call
*/
public static DTMAxisIterator documentF(Object arg1, DTMAxisIterator arg2,
String xslURI, AbstractTranslet translet, DOM dom)
throws TransletException {
String baseURI = null;
final int arg2FirstNode = arg2.next();
if (arg2FirstNode == DTMAxisIterator.END) {
// the second argument node-set is empty
return EmptyIterator.getInstance();
} else {
//System.err.println("arg2FirstNode name: "
// + dom.getNodeName(arg2FirstNode )+"["
// +Integer.toHexString(arg2FirstNode )+"]");
baseURI = dom.getDocumentURI(arg2FirstNode);
if (!SystemIDResolver.isAbsoluteURI(baseURI))
baseURI = SystemIDResolver.getAbsoluteURIFromRelative(baseURI);
}
try {
if (arg1 instanceof String) {
if (((String)arg1).length() == 0) {
return document(xslURI, "", translet, dom);
} else {
return document((String)arg1, baseURI, translet, dom);
}
} else if (arg1 instanceof DTMAxisIterator) {
return document((DTMAxisIterator)arg1, baseURI, translet, dom);
} else {
final String err = "document("+arg1.toString()+")";
throw new IllegalArgumentException(err);
}
} catch (Exception e) {
throw new TransletException(e);
}
}
示例14: copy
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public void copy(final int node, SerializationHandler handler)
throws TransletException
{
if (node != DTM.NULL) {
_adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].copy(node, handler);
}
}
示例15: shallowCopy
import com.sun.org.apache.xalan.internal.xsltc.TransletException; //导入依赖的package包/类
public String shallowCopy(final int node, SerializationHandler handler)
throws TransletException
{
if (node == DTM.NULL) {
return "";
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].shallowCopy(node, handler);
}