FileDocCategorySizeDatePackage
FuncGenerateId.javaAPI DocJava SE 5 API1989Fri Aug 26 14:56:08 BST 2005com.sun.org.apache.xpath.internal.functions

FuncGenerateId

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

Fields Summary
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;