예제 #1
0
 /**
  * Provide information about the node being copied. This method is called immediately before the
  * startElement call for the element node in question.
  *
  * @param element the node being copied, which must be an element node
  */
 public int notifyElementNode(NodeInfo element) {
   systemId = (wholeDocument ? element.getSystemId() : element.getBaseURI());
   // The logic behind this is that if we are copying the whole document, we will be copying all
   // the relevant xml:base attributes; so retaining the systemId values is sufficient to enable
   // the base URIs of the nodes to be preserved. But if we only copy an element (for example
   // an xsl:import-schema element - see test schema091 - then its base URI might be affected
   // by xml:base attributes that aren't being copied. Ideally we would have two separate
   // properties,
   // but XDM doesn't work that way.
   lineNumber = element.getLineNumber();
   return 0;
 }