1 16 19 package org.apache.xpath.functions; 20 21 import org.apache.xml.dtm.DTM; 22 import org.apache.xpath.XPathContext; 23 import org.apache.xpath.objects.XObject; 24 import org.apache.xpath.objects.XString; 25 26 30 public class FuncQname extends FunctionDef1Arg 31 { 32 33 41 public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException 42 { 43 44 int context = getArg0AsNode(xctxt); 45 XObject val; 46 47 if (DTM.NULL != context) 48 { 49 DTM dtm = xctxt.getDTM(context); 50 String qname = dtm.getNodeNameX(context); 51 val = (null == qname) ? XString.EMPTYSTRING : new XString(qname); 52 } 53 else 54 { 55 val = XString.EMPTYSTRING; 56 } 57 58 return val; 59 } 60 } 61 | Popular Tags |