FileDocCategorySizeDatePackage
FuncGenerateId.javaAPI DocJava SE 6 API2057Tue Jun 10 00:23:14 BST 2008com.sun.org.apache.xpath.internal.functions

FuncGenerateId

public class FuncGenerateId extends FunctionDef1Arg
Execute the GenerateId() function.
xsl.usage
advanced

Fields Summary
static final long
serialVersionUID
Constructors Summary
Methods Summary
public com.sun.org.apache.xpath.internal.objects.XObjectexecute(com.sun.org.apache.xpath.internal.XPathContext xctxt)
Execute the function. The function must return a valid object.

param
xctxt The current execution context.
return
A valid XObject.
throws
javax.xml.transform.TransformerException


                            
       
  

    int which = getArg0AsNode(xctxt);

    if (DTM.NULL != which)
    {
      // Note that this is a different value than in previous releases
      // of Xalan. It's sensitive to the exact encoding of the node
      // handle anyway, so fighting to maintain backward compatability
      // really didn't make sense; it may change again as we continue
      // to experiment with balancing document and node numbers within
      // that value.
      return new XString("N" + Integer.toHexString(which).toUpperCase());
    }
    else
      return XString.EMPTYSTRING;