xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From santiag...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java DOMImpl.java MultiDOM.java
Date Wed, 17 Apr 2002 20:25:51 GMT
santiagopg    02/04/17 13:25:51

  Modified:    java/src/org/apache/xalan/xsltc/dom Tag:
                        jaxp-ri-1_2_0-fcs-branch DOMAdapter.java
                        DOMImpl.java MultiDOM.java
  Log:
  Added support for extension function nodeset().
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.8.2  +13 -2     xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMAdapter.java
  
  Index: DOMAdapter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMAdapter.java,v
  retrieving revision 1.11.8.1
  retrieving revision 1.11.8.2
  diff -u -r1.11.8.1 -r1.11.8.2
  --- DOMAdapter.java	15 Apr 2002 19:51:22 -0000	1.11.8.1
  +++ DOMAdapter.java	17 Apr 2002 20:25:51 -0000	1.11.8.2
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: DOMAdapter.java,v 1.11.8.1 2002/04/15 19:51:22 santiagopg Exp $
  + * @(#)$Id: DOMAdapter.java,v 1.11.8.2 2002/04/17 20:25:51 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -80,6 +80,8 @@
       private short[] _NSreverse;
   
       private StripFilter _filter = null;
  +
  +    private int _multiDOMMask;
       
       public DOMAdapter(DOMImpl dom,
   		      String[] namesArray,
  @@ -111,6 +113,14 @@
   	return _domImpl.getTreeString();
       }
       
  +    public int getMultiDOMMask() {
  +	return _multiDOMMask;
  +    }
  +
  +    public void setMultiDOMMask(int mask) {
  +	_multiDOMMask = mask;
  +    }
  +
       public NodeIterator getChildren(final int node) {
   	NodeIterator iterator = _domImpl.getChildren(node);
   	if (_filter == null) {
  @@ -139,8 +149,9 @@
   
       public NodeIterator getAxisIterator(final int axis) {
   	NodeIterator iterator = _domImpl.getAxisIterator(axis);
  -	if (_filter != null)
  +	if (_filter != null) {
   	    iterator = _domImpl.strippingIterator(iterator,_mapping,_filter);
  +	}
   	return(iterator);
       }
       
  
  
  
  1.66.4.4  +8 -5      xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
  
  Index: DOMImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
  retrieving revision 1.66.4.3
  retrieving revision 1.66.4.4
  diff -u -r1.66.4.3 -r1.66.4.4
  --- DOMImpl.java	16 Apr 2002 17:29:27 -0000	1.66.4.3
  +++ DOMImpl.java	17 Apr 2002 20:25:51 -0000	1.66.4.4
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: DOMImpl.java,v 1.66.4.3 2002/04/16 17:29:27 santiagopg Exp $
  + * @(#)$Id: DOMImpl.java,v 1.66.4.4 2002/04/17 20:25:51 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -141,7 +141,8 @@
       private BitArray  _dontEscape = null; 
   
       // The URI to this document
  -    private String    _documentURI;
  +    private String    _documentURI = null;
  +    static private int _documentURIIndex = 0;
   
       // Support for access/navigation through org.w3c.dom API
       private Node[] _nodes;
  @@ -163,11 +164,11 @@
        * Returns the origin of the document from which the tree was built
        */
       public String getDocumentURI() {
  -	return(_documentURI);
  +	return (_documentURI != null) ? _documentURI : "rtf" + _documentURIIndex++;
       }
   
       public String getDocumentURI(int node) {
  -	return(_documentURI);
  +	return getDocumentURI();
       }
   
       public void setupMapping(String[] names, String[] namespaces) {
  @@ -1518,7 +1519,9 @@
   
   	public int next() {
   	    while (++_node < _limit) {
  -		if (_type[_node] > TEXT) return(returnNode(_node));
  +		if (_type[_node] > TEXT) {
  +		    return(returnNode(_node));
  +		}
   	    } 
   	    return(NULL);
   	}
  
  
  
  1.16.8.2  +7 -5      xml-xalan/java/src/org/apache/xalan/xsltc/dom/MultiDOM.java
  
  Index: MultiDOM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/MultiDOM.java,v
  retrieving revision 1.16.8.1
  retrieving revision 1.16.8.2
  diff -u -r1.16.8.1 -r1.16.8.2
  --- MultiDOM.java	15 Apr 2002 19:51:22 -0000	1.16.8.1
  +++ MultiDOM.java	17 Apr 2002 20:25:51 -0000	1.16.8.2
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: MultiDOM.java,v 1.16.8.1 2002/04/15 19:51:22 santiagopg Exp $
  + * @(#)$Id: MultiDOM.java,v 1.16.8.2 2002/04/17 20:25:51 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -114,6 +114,7 @@
   	public NodeIterator setStartNode(final int node) {
   	    _mask = node & SET;
   	    int dom = node >>> 24;
  +
   	    // consider caching these
   	    if ((_type == NO_TYPE) || (_type == DOM.ELEMENT)) {
   		_source = _adapters[dom].getAxisIterator(_axis);
  @@ -262,8 +263,7 @@
   	// This method only has a function in DOM adapters
       }
   
  -    public int addDOMAdapter(DOM dom) {
  -
  +    public int addDOMAdapter(DOMAdapter dom) {
   	// Add the DOM adapter to the array of DOMs
   	final int domNo = _free++;
   	if (domNo == _size) {
  @@ -275,9 +275,11 @@
   
   	// Store reference to document (URI) in hashtable
   	String uri = dom.getDocumentURI(0);
  -	_documents.put(uri,new Integer(domNo));
  +	_documents.put(uri, new Integer(domNo));
   	
  -	return domNo << 24;
  +	// Store mask in DOMAdapter
  +	dom.setMultiDOMMask(domNo << 24);
  +	return (domNo << 24);
       }
       
       public int getDocumentMask(String uri) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message