You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/08/01 00:09:56 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java

sboag       00/07/31 15:09:56

  Modified:    java/src/org/apache/xalan/templates ElemLiteralResult.java
  Log:
  Add proper xsl:extension-element-prefixes property, same as in Stylesheet.
  
  Revision  Changes    Path
  1.5       +43 -2     xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java
  
  Index: ElemLiteralResult.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElemLiteralResult.java	2000/07/28 22:13:47	1.4
  +++ ElemLiteralResult.java	2000/07/31 22:09:55	1.5
  @@ -195,10 +195,51 @@
     }
   
     /**
  -   * Move this to the processer package.
  +   * The "extension-element-prefixes" property, actually contains URIs. 
      */
  -  public String m_extensionElementPrefixes[] = null;  
  +  private StringVector m_ExtensionElementURIs;
  +
  +  /**
  +   * Set the "extension-element-prefixes" property. 
  +   * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
  +   */
  +  public void setExtensionElementPrefixes (StringVector v)
  +  {
  +    m_ExtensionElementURIs = v;
  +  }
  +
  +  /**
  +   * Get and "extension-element-prefix" property. 
  +   * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
  +   */
  +  public String getExtensionElementPrefix(int i)
  +    throws ArrayIndexOutOfBoundsException
  +  {
  +    if(null == m_ExtensionElementURIs)
  +      throw new ArrayIndexOutOfBoundsException();
  +    return m_ExtensionElementURIs.elementAt(i);
  +  }
     
  +  /**
  +   * Get the number of "extension-element-prefixes" Strings. 
  +   * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
  +   */
  +  public int getExtensionElementPrefixCount()
  +  {
  +    return (null != m_ExtensionElementURIs) 
  +           ? m_ExtensionElementURIs.size() : 0;
  +  }
  +  
  +  /**
  +   * Get and "extension-element-prefix" property. 
  +   * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
  +   */
  +  public boolean containsExtensionElementURI(String uri)
  +  {
  +    if(null == m_ExtensionElementURIs)
  +      return false;
  +    return m_ExtensionElementURIs.contains(uri);
  +  }  
   
     /**
      * Get an int constant identifying the type of element.