ilene       2002/12/06 10:14:53

  Modified:    java/src/org/apache/xalan/templates Tag: xslt20 AVT.java
                        ElemElement.java ElemAttribute.java Constants.java
               java/src/org/apache/xalan/processor Tag: xslt20
                        XSLTElementProcessor.java XSLTSchema.java
                        XSLTAttributeDef.java
               java/src/org/apache/xpath/res Tag: xslt20
                        XPATHErrorResources.properties
                        XPATHErrorResources.java
               java/src/org/apache/xml/utils Tag: xslt20
                        StringToIntTable.java QName.java
               java/src/org/apache/xalan/res Tag: xslt20
                        XSLTInfo.properties XSLTErrorResources.java
                        XSLTErrorResources.properties
  Added:       java/src/org/apache/xml/utils Tag: xslt20 XMLChar.java
  Log:
  Propogating patches for bugzilla#5013, 6972.  
  
  This covers a lot of static error handling which fixes many negative test 
cases.
  (Although there is still more to be done here.)
  
  Also, this fixes output102 and output106 on the xslt20 branch.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.1.2.1 +7 -1      xml-xalan/java/src/org/apache/xalan/templates/AVT.java
  
  Index: AVT.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/AVT.java,v
  retrieving revision 1.18.2.1
  retrieving revision 1.18.2.1.2.1
  diff -u -r1.18.2.1 -r1.18.2.1.2.1
  --- AVT.java  14 Aug 2002 19:21:28 -0000      1.18.2.1
  +++ AVT.java  6 Dec 2002 18:14:51 -0000       1.18.2.1.2.1
  @@ -627,5 +627,11 @@
         }              
        }
     }
  -
  +
  +  /**
  +   * Returns true if this AVT is simple
  +   */
  +  public boolean isSimple() {
  +     return m_simpleString != null;
  +  }
   }
  
  
  
  1.26.2.1.2.1 +6 -3      
xml-xalan/java/src/org/apache/xalan/templates/ElemElement.java
  
  Index: ElemElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemElement.java,v
  retrieving revision 1.26.2.1
  retrieving revision 1.26.2.1.2.1
  diff -u -r1.26.2.1 -r1.26.2.1.2.1
  --- ElemElement.java  14 Aug 2002 19:21:28 -0000      1.26.2.1
  +++ ElemElement.java  6 Dec 2002 18:14:51 -0000       1.26.2.1.2.1
  @@ -284,12 +284,15 @@
        ResultTreeHandler rhandler = transformer.getResultTreeHandler();
       XPathContext xctxt = transformer.getXPathContext();
       int sourceNode = xctxt.getCurrentNode();
  -    String nodeName = m_name_avt.evaluate(xctxt, sourceNode, this);
  +    
  +    
  +    String nodeName = m_name_avt == null ? null : m_name_avt.evaluate(xctxt, 
sourceNode, this);
   
       String prefix = null;
       String nodeNamespace = "";
   
  -    if (!validateNodeName(nodeName))
  +    // Only validate if an AVT was used.
  +    if ((nodeName != null) && (!m_name_avt.isSimple()) && 
(!validateNodeName(nodeName)))
       {
         transformer.getMsgMgr().warn(
           this, XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_VALUE,
  @@ -298,7 +301,7 @@
         nodeName = null;
       }
   
  -    else
  +    else if (nodeName != null)
       {
         prefix = QName.getPrefixPart(nodeName);
   
  
  
  
  1.18.2.1.2.1 +14 -0     
xml-xalan/java/src/org/apache/xalan/templates/ElemAttribute.java
  
  Index: ElemAttribute.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemAttribute.java,v
  retrieving revision 1.18.2.1
  retrieving revision 1.18.2.1.2.1
  diff -u -r1.18.2.1 -r1.18.2.1.2.1
  --- ElemAttribute.java        14 Aug 2002 19:21:28 -0000      1.18.2.1
  +++ ElemAttribute.java        6 Dec 2002 18:14:51 -0000       1.18.2.1.2.1
  @@ -293,4 +293,18 @@
   
       return super.appendChild(newChild);
     }
  +     /**
  +      * @see ElemElement#setName(AVT)
  +      */
  +     public void setName(AVT v) {
  +        if (v.isSimple())
  +        {
  +            if (v.getSimpleString().equals("xmlns"))
  +            {
  +                throw new IllegalArgumentException();
  +            }
  +        }
  +             super.setName(v);
  +     }
  +
   }
  
  
  
  1.14.2.1.2.2 +10 -0     
xml-xalan/java/src/org/apache/xalan/templates/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/Constants.java,v
  retrieving revision 1.14.2.1.2.1
  retrieving revision 1.14.2.1.2.2
  diff -u -r1.14.2.1.2.1 -r1.14.2.1.2.2
  --- Constants.java    16 Aug 2002 21:23:47 -0000      1.14.2.1.2.1
  +++ Constants.java    6 Dec 2002 18:14:51 -0000       1.14.2.1.2.2
  @@ -493,6 +493,8 @@
     /** For Stylesheet-prefix and result-prefix in xsl:namespace-alias         
 */
     public static final String ATTRVAL_DEFAULT_PREFIX = "#default";
   
  + /** Integer equivalents for above        */
  +  public static final int NUMBERLETTER_ALPHABETIC = 1, 
NUMBERLETTER_TRADITIONAL = 2;
     
     /** Integer equivelents for above        */
     public static final int NUMBERLEVEL_SINGLE = 1, NUMBERLEVEL_MULTI = 2,
  @@ -512,6 +514,14 @@
                                ATTRVAL_CASEORDER_UPPER = "upper-first",
                                ATTRVAL_CASEORDER_LOWER = "lower-first";
   
  + /** Integer equivelents for DATATYPE attribute */
  +  public static final int SORTDATATYPE_TEXT = 1, SORTDATATYPE_NUMBER = 2;
  +
  +  /** Integer equivelents for ORDER attribute */
  +  public static final int SORTORDER_ASCENDING = 1, SORTORDER_DESCENDING = 2;
  +  
  +  /** Integer equivelents for CASE-ORDER attribute */
  +  public static final int SORTCASEORDER_UPPERFIRST = 1, 
SORTCASEORDER_LOWERFIRST = 2;
     
     /** some stuff for Decimal-format       */
     public static final String ATTRVAL_INFINITY = "Infinity",
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.14.2.1.2.1 +12 -3     
xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java
  
  Index: XSLTElementProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java,v
  retrieving revision 1.14.2.1
  retrieving revision 1.14.2.1.2.1
  diff -u -r1.14.2.1 -r1.14.2.1.2.1
  --- XSLTElementProcessor.java 14 Aug 2002 19:21:26 -0000      1.14.2.1
  +++ XSLTElementProcessor.java 6 Dec 2002 18:14:51 -0000       1.14.2.1.2.1
  @@ -338,6 +338,8 @@
       // Keep track of which XSLTAttributeDefs have been processed, so 
       // I can see which default values need to be set.
       Vector processedDefs = new Vector();
  +    // Keep track of XSLTAttributeDefs that were invalid
  +    Vector errorDefs = new Vector();    
       int nAttrs = attributes.getLength();
   
       for (int i = 0; i < nAttrs; i++)
  @@ -373,10 +375,17 @@
         }
         else
         {
  -        processedDefs.addElement(attrDef);
  -        attrDef.setAttrValue(handler, attrUri, attrLocalName,
  +        // Can we switch the order here:
  +
  +        boolean success = attrDef.setAttrValue(handler, attrUri, 
attrLocalName,
                                attributes.getQName(i), attributes.getValue(i),
                                target);
  +                             
  +        // Now we only add the element if it passed a validation check
  +        if (success)
  +            processedDefs.addElement(attrDef);
  +        else
  +            errorDefs.addElement(attrDef);
         }
       }
   
  @@ -398,7 +407,7 @@
   
         if (attrDef.getRequired())
         {
  -        if (!processedDefs.contains(attrDef))
  +        if ((!processedDefs.contains(attrDef)) && 
(!errorDefs.contains(attrDef)))
             handler.error(
               XSLMessages.createMessage(
                 XSLTErrorResources.ER_REQUIRES_ATTRIB, new Object[]{ rawName,
  
  
  
  1.29.2.1.2.4 +171 -108  
xml-xalan/java/src/org/apache/xalan/processor/XSLTSchema.java
  
  Index: XSLTSchema.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTSchema.java,v
  retrieving revision 1.29.2.1.2.3
  retrieving revision 1.29.2.1.2.4
  diff -u -r1.29.2.1.2.3 -r1.29.2.1.2.4
  --- XSLTSchema.java   3 Dec 2002 19:59:54 -0000       1.29.2.1.2.3
  +++ XSLTSchema.java   6 Dec 2002 18:14:51 -0000       1.29.2.1.2.4
  @@ -89,124 +89,166 @@
      * This method builds an XSLT "schema" according to 
http://www.w3.org/TR/xslt#dtd.  This
      * schema provides instructions for building the Xalan Stylesheet 
(Templates) structure.
      */
  -  void build()
  +void build()
     {
  -
  +    // xsl:import, xsl:include
       XSLTAttributeDef hrefAttr = new XSLTAttributeDef(null, "href",
  -                                  XSLTAttributeDef.T_URL, true);
  -    XSLTAttributeDef hrefAttrOpt = new XSLTAttributeDef(null, "href",
  -                                  XSLTAttributeDef.T_URL, false);
  +                                  XSLTAttributeDef.T_URL, true, 
false,XSLTAttributeDef.ERROR);
  +                                  
  +    // Was needed by principal-result-document which has been removed?  
Ilene -- Dec. 02/02                                  
  +//    XSLTAttributeDef hrefAttrOpt = new XSLTAttributeDef(null, "href",
  +//                                  XSLTAttributeDef.T_URL, false);
       
       XSLTAttributeDef elementsAttr = new XSLTAttributeDef(null, "elements",
                                         XSLTAttributeDef.T_SIMPLEPATTERNLIST,
  -                                      true);
  +                                      true, false, XSLTAttributeDef.ERROR);
       // XSLTAttributeDef anyNamespacedAttr = new XSLTAttributeDef("*", "*",
       //                                XSLTAttributeDef.T_CDATA, false);
  +    // xsl:output
       XSLTAttributeDef methodAttr = new XSLTAttributeDef(null, "method",
  -                                    XSLTAttributeDef.T_QNAME, false);
  +                                    XSLTAttributeDef.T_QNAME, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef versionAttr = new XSLTAttributeDef(null, "version",
  -                                     XSLTAttributeDef.T_NMTOKEN, false);
  +                                     XSLTAttributeDef.T_NMTOKEN, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef encodingAttr = new XSLTAttributeDef(null, "encoding",
  -                                      XSLTAttributeDef.T_CDATA, false);
  +                                      XSLTAttributeDef.T_CDATA, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef omitXmlDeclarationAttr = new XSLTAttributeDef(null,
                                                   "omit-xml-declaration",
                                                   XSLTAttributeDef.T_YESNO,
  -                                                false);
  +                                                false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef standaloneAttr = new XSLTAttributeDef(null,
                                           "standalone",
  -                                        XSLTAttributeDef.T_YESNO, false);
  +                                        XSLTAttributeDef.T_YESNO, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef doctypePublicAttr = new XSLTAttributeDef(null,
                                              "doctype-public",
  -                                           XSLTAttributeDef.T_CDATA, false);
  +                                           XSLTAttributeDef.T_CDATA, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef doctypeSystemAttr = new XSLTAttributeDef(null,
                                              "doctype-system",
  -                                           XSLTAttributeDef.T_CDATA, false);
  +                                           XSLTAttributeDef.T_CDATA, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef cdataSectionElementsAttr = new XSLTAttributeDef(null,
                                                     "cdata-section-elements",
  -                                                  XSLTAttributeDef.T_QNAMES,
  -                                                  false);
  +                                                  
XSLTAttributeDef.T_QNAMES_RESOLVE_NULL,
  +                                                  false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef indentAttr = new XSLTAttributeDef(null, "indent",
  -                                    XSLTAttributeDef.T_YESNO, false);
  +                                    XSLTAttributeDef.T_YESNO, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef mediaTypeAttr = new XSLTAttributeDef(null, "media-type",
  -                                       XSLTAttributeDef.T_CDATA, false);
  +                                       XSLTAttributeDef.T_CDATA, false, 
false,XSLTAttributeDef.ERROR);
  +    // Required.
  +    // It is an error if the name attribute is invalid on any of these 
elements
  +    // xsl:key, xsl:attribute-set, xsl:call-template, xsl:with-param, 
xsl:variable, xsl:param
       XSLTAttributeDef nameAttrRequired = new XSLTAttributeDef(null, "name",
  -                                          XSLTAttributeDef.T_QNAME, true);
  +                                          XSLTAttributeDef.T_QNAME, true, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef nameAttrOpt = new XSLTAttributeDef(null, "name",
  -                                     XSLTAttributeDef.T_QNAME, false);
  -    XSLTAttributeDef useAttr = new XSLTAttributeDef(null, "use",
  -                                 XSLTAttributeDef.T_EXPR, true);
  +                                     XSLTAttributeDef.T_QNAME, false, false, 
XSLTAttributeDef.ERROR);
  +
       XSLTAttributeDef nameAVTRequired = new XSLTAttributeDef(null, "name",
  -                                         XSLTAttributeDef.T_AVT, true);
  +                                         XSLTAttributeDef.T_AVT_QNAME, true, 
true,XSLTAttributeDef.WARNING);
  +    // Required.
  +    // Support AVT
  +    // xsl:processing-instruction                                     
  +    XSLTAttributeDef nameAVT_NCNAMERequired = new XSLTAttributeDef(null, 
"name",
  +                                         XSLTAttributeDef.T_NCNAME, true, 
true,XSLTAttributeDef.WARNING);
  +                                        
  +    // Optional.
  +    // Static error if invalid
  +    // xsl:template, xsl:decimal-format                                      
  +    XSLTAttributeDef nameAttrOpt_ERROR = new XSLTAttributeDef(null, "name",
  +                                     XSLTAttributeDef.T_QNAME, false, 
false,XSLTAttributeDef.ERROR);
  +
  +    // xsl:key                                 
  +    XSLTAttributeDef useAttr = new XSLTAttributeDef(null, "use",
  +                                 XSLTAttributeDef.T_EXPR, true, 
false,XSLTAttributeDef.ERROR);
  +    // xsl:element, xsl:attribute                              
       XSLTAttributeDef namespaceAVTOpt = new XSLTAttributeDef(null,
  -                                         "namespace", XSLTAttributeDef.T_AVT,
  -                                         false);
  +                                         "namespace",XSLTAttributeDef.T_URL,
  +                                         false, 
true,XSLTAttributeDef.WARNING);
  +    // xsl:decimal-format                                     
       XSLTAttributeDef decimalSeparatorAttr = new XSLTAttributeDef(null,
                                                 "decimal-separator",
  -                                              XSLTAttributeDef.T_CHAR, ".");
  -    XSLTAttributeDef groupingSeparatorAttr = new XSLTAttributeDef(null,
  -                                               "grouping-separator",
  -                                               XSLTAttributeDef.T_CHAR, ",");
  +                                              XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR, ".");
       XSLTAttributeDef infinityAttr = new XSLTAttributeDef(null, "infinity",
  -                                      XSLTAttributeDef.T_CDATA, "Infinity");
  +                                      XSLTAttributeDef.T_CDATA, 
false,XSLTAttributeDef.ERROR,"Infinity");
       XSLTAttributeDef minusSignAttr = new XSLTAttributeDef(null, "minus-sign",
  -                                       XSLTAttributeDef.T_CHAR, "-");
  +                                       XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR,"-");
       XSLTAttributeDef NaNAttr = new XSLTAttributeDef(null, "NaN",
  -                                 XSLTAttributeDef.T_CDATA, "NaN");
  +                                 XSLTAttributeDef.T_CDATA, 
false,XSLTAttributeDef.ERROR, "NaN");
       XSLTAttributeDef percentAttr = new XSLTAttributeDef(null, "percent",
  -                                     XSLTAttributeDef.T_CHAR, "%");
  +                                     XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR, "%");
       XSLTAttributeDef perMilleAttr = new XSLTAttributeDef(null, "per-mille",
                                         XSLTAttributeDef.T_CHAR,
  -                                      false /* ,"&#x2030;" */);
  +                                      false, false,XSLTAttributeDef.ERROR /* 
,"&#x2030;" */);
       XSLTAttributeDef zeroDigitAttr = new XSLTAttributeDef(null, "zero-digit",
  -                                       XSLTAttributeDef.T_CHAR, "0");
  +                                       XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR, "0");
       XSLTAttributeDef digitAttr = new XSLTAttributeDef(null, "digit",
  -                                   XSLTAttributeDef.T_CHAR, "#");
  +                                   XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR, "#");
       XSLTAttributeDef patternSeparatorAttr = new XSLTAttributeDef(null,
                                                 "pattern-separator",
  -                                              XSLTAttributeDef.T_CHAR, ";");
  +                                              XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR, ";");
  +    // xsl:decimal-format                                         
  +    XSLTAttributeDef groupingSeparatorAttr = new XSLTAttributeDef(null,
  +                                               "grouping-separator",
  +                                               XSLTAttributeDef.T_CHAR, 
false,XSLTAttributeDef.ERROR,",");
  +    // xsl:element, xsl:attribute-set, xsl:copy                              
             
       XSLTAttributeDef useAttributeSetsAttr = new XSLTAttributeDef(null,
                                                 "use-attribute-sets",
                                                 XSLTAttributeDef.T_QNAMES,
  -                                              false);
  +                                              false, false, 
XSLTAttributeDef.ERROR);
  +    // xsl:if, xsl:when         
  +    XSLTAttributeDef testAttrRequired = new XSLTAttributeDef(null, "test",   
  +                                          XSLTAttributeDef.T_EXPR, true, 
false,XSLTAttributeDef.ERROR);
  +      
  +    // Required.                                       
  +    // xsl:value-of, xsl:for-each, xsl:copy-of                             
       XSLTAttributeDef selectAttrRequired = new XSLTAttributeDef(null,
                                               "select",
  -                                            XSLTAttributeDef.T_EXPR, true);
  +                                            XSLTAttributeDef.T_EXPR, true, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef separatorAttr = new XSLTAttributeDef(null, "separator",
  -                                       XSLTAttributeDef.T_AVT, false);
  -    XSLTAttributeDef testAttrRequired = new XSLTAttributeDef(null, "test",
  -                                          XSLTAttributeDef.T_EXPR, true);
  +                                       XSLTAttributeDef.T_CDATA, false, 
true,XSLTAttributeDef.ERROR);
       XSLTAttributeDef selectAttrOpt = new XSLTAttributeDef(null, "select",
  -                                       XSLTAttributeDef.T_EXPR, false);
  +                                       XSLTAttributeDef.T_EXPR, false, 
false,XSLTAttributeDef.ERROR);
  +    // Optional.
  +    // Default: "node()"
  +    // xsl:apply-templates                                           
       XSLTAttributeDef selectAttrDefNode = new XSLTAttributeDef(null, "select",
  -                                           XSLTAttributeDef.T_EXPR, 
"node()");
  +                                           XSLTAttributeDef.T_EXPR, 
false,XSLTAttributeDef.ERROR, "node()");
  +    // Optional.
  +    // Default: "."
  +    // xsl:sort                                        
       XSLTAttributeDef selectAttrDefDot = new XSLTAttributeDef(null, "select",
  -                                          XSLTAttributeDef.T_EXPR, ".");
  +                                          XSLTAttributeDef.T_EXPR, 
false,XSLTAttributeDef.ERROR, ".");
  +    // xsl:key                                      
       XSLTAttributeDef matchAttrRequired = new XSLTAttributeDef(null, "match",
  -                                           XSLTAttributeDef.T_PATTERN, true);
  +                                           XSLTAttributeDef.T_PATTERN, true, 
false,XSLTAttributeDef.ERROR);
  +    // xsl:template                                       
       XSLTAttributeDef matchAttrOpt = new XSLTAttributeDef(null, "match",
  -                                      XSLTAttributeDef.T_PATTERN, false);
  +                                      XSLTAttributeDef.T_PATTERN, false, 
false,XSLTAttributeDef.ERROR);
  +    // xsl:template                                  
       XSLTAttributeDef priorityAttr = new XSLTAttributeDef(null, "priority",
  -                                      XSLTAttributeDef.T_PRIORITY, false);
  +                                     XSLTAttributeDef.T_NUMBER, false, 
false,XSLTAttributeDef.ERROR);
  +    // xsl:template, xsl:apply-templates                                 
       XSLTAttributeDef modeAttr = new XSLTAttributeDef(null, "mode",
  -                                  XSLTAttributeDef.T_QNAME, false);
  +                                     XSLTAttributeDef.T_QNAME, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef spaceAttr =
  -      new XSLTAttributeDef(Constants.S_XMLNAMESPACEURI, "space", false,
  +      new XSLTAttributeDef(Constants.S_XMLNAMESPACEURI, "space", false, 
false, false, XSLTAttributeDef.WARNING,
                              "default", Constants.ATTRVAL_STRIP, "preserve",
                              Constants.ATTRVAL_PRESERVE);
       XSLTAttributeDef spaceAttrLiteral =
         new XSLTAttributeDef(Constants.S_XMLNAMESPACEURI, "space", 
  -                                          XSLTAttributeDef.T_AVT, false);
  +                                          XSLTAttributeDef.T_URL, false, 
true,XSLTAttributeDef.ERROR);
  +    // xsl:namespace-alias                                      
       XSLTAttributeDef stylesheetPrefixAttr = new XSLTAttributeDef(null,
                                                 "stylesheet-prefix",
  -                                              XSLTAttributeDef.T_CDATA, 
true);
  +                                              XSLTAttributeDef.T_CDATA, 
true, false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef resultPrefixAttr = new XSLTAttributeDef(null,
                                             "result-prefix",
  -                                          XSLTAttributeDef.T_CDATA, true);
  +                                          XSLTAttributeDef.T_CDATA, true, 
false,XSLTAttributeDef.ERROR);
  +    // xsl:text, xsl:value-of                                      
       XSLTAttributeDef disableOutputEscapingAttr = new XSLTAttributeDef(null,
                                                      "disable-output-escaping",
                                                      XSLTAttributeDef.T_YESNO,
  -                                                   false);
  -    XSLTAttributeDef levelAttr = new XSLTAttributeDef(null, "level", false,
  +                                                   false, 
false,XSLTAttributeDef.ERROR);
  +                                                   
  +    // xsl:number                                                   
  +    XSLTAttributeDef levelAttr = new XSLTAttributeDef(null, "level", false, 
false, false, XSLTAttributeDef.ERROR,
                                      "single", Constants.NUMBERLEVEL_SINGLE,
                                      "multiple", Constants.NUMBERLEVEL_MULTI,
                                      "any", Constants.NUMBERLEVEL_ANY);
  @@ -214,85 +256,106 @@
       levelAttr.setDefault("single");
   
       XSLTAttributeDef countAttr = new XSLTAttributeDef(null, "count",
  -                                   XSLTAttributeDef.T_PATTERN, false);
  +                                   XSLTAttributeDef.T_PATTERN, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef fromAttr = new XSLTAttributeDef(null, "from",
  -                                  XSLTAttributeDef.T_PATTERN, false);
  +                                  XSLTAttributeDef.T_PATTERN, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef valueAttr = new XSLTAttributeDef(null, "value",
  -                                   XSLTAttributeDef.T_EXPR, false);
  +                                   XSLTAttributeDef.T_EXPR, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef formatAttr = new XSLTAttributeDef(null, "format",
  -                                    XSLTAttributeDef.T_AVT, false);
  +                                    XSLTAttributeDef.T_CDATA, false, 
true,XSLTAttributeDef.ERROR);
   
       formatAttr.setDefault("1");
   
  +    // xsl:number, xsl:sort
       XSLTAttributeDef langAttr = new XSLTAttributeDef(null, "lang",
  -                                  XSLTAttributeDef.T_AVT, false);
  +                                  XSLTAttributeDef.T_NMTOKEN, false, 
true,XSLTAttributeDef.ERROR);
  +    // xsl:number
       XSLTAttributeDef letterValueAttr = new XSLTAttributeDef(null,
                                            "letter-value",
  -                                         XSLTAttributeDef.T_AVT, false);
  +                                         false, true, false, 
XSLTAttributeDef.ERROR,
  +                                         "alphabetic", 
Constants.NUMBERLETTER_ALPHABETIC,
  +                                         "traditional", 
Constants.NUMBERLETTER_TRADITIONAL);
  +    // xsl:number
       XSLTAttributeDef groupingSeparatorAVT = new XSLTAttributeDef(null,
                                                 "grouping-separator",
  -                                              XSLTAttributeDef.T_AVT, false);
  +                                              XSLTAttributeDef.T_CHAR, 
false, true,XSLTAttributeDef.ERROR);
  +    // xsl:number
       XSLTAttributeDef groupingSizeAttr = new XSLTAttributeDef(null,
                                             "grouping-size",
  -                                          XSLTAttributeDef.T_AVT, false);
  -    XSLTAttributeDef dataTypeAttr = new XSLTAttributeDef(null, "data-type",
  -                                      XSLTAttributeDef.T_AVT, "text");
  -    XSLTAttributeDef orderAttr = new XSLTAttributeDef(null, "order",
  -                                   XSLTAttributeDef.T_AVT, "ascending");
  -    XSLTAttributeDef caseOrderAttr = new XSLTAttributeDef(null, "case-order",
  -                                       XSLTAttributeDef.T_AVT, false);
  +                                          XSLTAttributeDef.T_NUMBER, false, 
true,XSLTAttributeDef.ERROR);
  +   // xsl:sort
  +    XSLTAttributeDef dataTypeAttr = new XSLTAttributeDef(null, "data-type", 
false, true, true, XSLTAttributeDef.ERROR,
  +                                    "text", Constants.SORTDATATYPE_TEXT 
,"number", Constants.SORTDATATYPE_TEXT);
  +    dataTypeAttr.setDefault("text");
  +    
  +    // xsl:sort
  +    XSLTAttributeDef orderAttr = new XSLTAttributeDef(null, "order", false, 
true, false,XSLTAttributeDef.ERROR,
  +                                    "ascending", 
Constants.SORTORDER_ASCENDING, 
  +                                    "descending", 
Constants.SORTORDER_DESCENDING);
  +    orderAttr.setDefault("ascending");
  +
  +    // xsl:sort                             
  +    XSLTAttributeDef caseOrderAttr = new XSLTAttributeDef(null, 
"case-order", false, true, false,XSLTAttributeDef.ERROR,
  +                                       "upper-first", 
Constants.SORTCASEORDER_UPPERFIRST ,
  +                                       "lower-first", 
Constants.SORTCASEORDER_LOWERFIRST);
  +    // xsl:message                                   
       XSLTAttributeDef terminateAttr = new XSLTAttributeDef(null, "terminate",
  -                                       XSLTAttributeDef.T_YESNO, false);
  +                                       XSLTAttributeDef.T_YESNO, false, 
false,XSLTAttributeDef.ERROR);
   
       terminateAttr.setDefault("no");
   
  +    // top level attributes
       XSLTAttributeDef xslExcludeResultPrefixesAttr =
         new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL,
                              "exclude-result-prefixes",
  -                           XSLTAttributeDef.T_STRINGLIST, false);
  +                           XSLTAttributeDef.T_STRINGLIST, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef xslExtensionElementPrefixesAttr =
         new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL,
                              "extension-element-prefixes",
  -                           XSLTAttributeDef.T_PREFIX_URLLIST, false);
  +                           XSLTAttributeDef.T_PREFIX_URLLIST, false, 
false,XSLTAttributeDef.ERROR);
  +    // result-element-atts                       
       XSLTAttributeDef xslUseAttributeSetsAttr =
         new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL, "use-attribute-sets",
  -                           XSLTAttributeDef.T_QNAMES, false);
  +                           XSLTAttributeDef.T_QNAMES, false, 
false,XSLTAttributeDef.ERROR);
       XSLTAttributeDef xslVersionAttr =
         new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL, "version",
  -                           XSLTAttributeDef.T_NMTOKEN, false);
  +                           XSLTAttributeDef.T_NMTOKEN, false, 
false,XSLTAttributeDef.ERROR);
       //dml for result-document
       XSLTAttributeDef resultDocFormatAttr =
         new XSLTAttributeDef(null, "format",
  -                           XSLTAttributeDef.T_QNAME, false);
  +                           XSLTAttributeDef.T_QNAME, false, false, 
XSLTAttributeDef.ERROR);
       // dml for output
       XSLTAttributeDef includeContentTypeAttr = new XSLTAttributeDef(null,
                                                      "include-content-type",
                                                      XSLTAttributeDef.T_YESNO,
  -                                                   false);
  +                                                   false, false, 
XSLTAttributeDef.ERROR);
       XSLTAttributeDef escapeUriAttributesAttr = new XSLTAttributeDef(null,
                                                      "escape-uri-attributes",
                                                      XSLTAttributeDef.T_YESNO,
  -                                                   false);
  +                                                   false, false, 
XSLTAttributeDef.ERROR);
       
  +    // xsl:for-each-group
       XSLTAttributeDef groupByAttr = new XSLTAttributeDef(null,
                                               "group-by",
  -                                            XSLTAttributeDef.T_EXPR, false); 
                          
  +                                            XSLTAttributeDef.T_EXPR, false, 
false, XSLTAttributeDef.ERROR);                           
       XSLTAttributeDef groupAdjAttr = new XSLTAttributeDef(null,
                                               "group-adjacent",
  -                                            XSLTAttributeDef.T_EXPR, false);
  +                                            XSLTAttributeDef.T_EXPR, false, 
false, XSLTAttributeDef.ERROR);
       XSLTAttributeDef groupStartWithAttr = new XSLTAttributeDef(null,
                                               "group-starting-with",
  -                                            XSLTAttributeDef.T_EXPR, false);
  +                                            XSLTAttributeDef.T_EXPR, false, 
false, XSLTAttributeDef.ERROR);
       XSLTAttributeDef groupEndWithAttr = new XSLTAttributeDef(null,
                                               "group-ending-with",
  -                                            XSLTAttributeDef.T_EXPR, false);
  +                                            XSLTAttributeDef.T_EXPR, false, 
false, XSLTAttributeDef.ERROR);
  +                                            
  +    // xsl:analyze-string                                            
       XSLTAttributeDef regexAttrRequired = new XSLTAttributeDef(null,
                                               "regex",
  -                                            XSLTAttributeDef.T_AVT, true);   
                        
  +                                            XSLTAttributeDef.T_CDATA, true, 
true, XSLTAttributeDef.ERROR);                           
       XSLTAttributeDef flagsAttr = new XSLTAttributeDef(null,
                                               "flags",
  -                                            XSLTAttributeDef.T_AVT, false);  
                                                                                
                                                 
  -             XSLTElementDef charData = new XSLTElementDef(this, null, 
"text()",
  +                                            XSLTAttributeDef.T_CDATA, false, 
true, XSLTAttributeDef.ERROR);                                                  
                                                                                
 
  +        XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
                                   null /*alias */, null /* elements */, null,  
/* attributes */
                                   new ProcessorCharacters(),
                                   
m_classesDef.getClass(Constants.ELEMNAME_TEXTLITERALRESULT) /* class object */);
  @@ -308,10 +371,10 @@
       charData.setType(XSLTElementDef.T_PCDATA);
   
       XSLTAttributeDef resultAttr = new XSLTAttributeDef(null, "*",
  -                                    XSLTAttributeDef.T_AVT, false);
  +                                    XSLTAttributeDef.T_AVT, false, 
true,XSLTAttributeDef.WARNING);
       XSLTAttributeDef xslResultAttr =
         new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL, "*",
  -                           XSLTAttributeDef.T_CDATA, false);
  +                           XSLTAttributeDef.T_CDATA, false, 
false,XSLTAttributeDef.WARNING);
       XSLTElementDef[] templateElements = new XSLTElementDef[27];
       XSLTElementDef[] templateElementsAndParams = new XSLTElementDef[28];
       XSLTElementDef[] templateElementsAndSort = new XSLTElementDef[28];
  @@ -420,7 +483,7 @@
                                     new XSLTAttributeDef[]{ selectAttrRequired,
                                                             spaceAttr }, 
                                                  new ProcessorTemplateElem(),
  -                                  
m_classesDef.getClass(Constants.ELEMNAME_FOREACH) /* class object */, true, 
false, true, 20, true);                
  +                                  
m_classesDef.getClass(Constants.ELEMNAME_FOREACH) /* class object */, true, 
false, true, 20, true);       
       XSLTElementDef xslMatchingSubstring = new XSLTElementDef(this,
                                     Constants.S_XSLNAMESPACEURL, 
"matching-substring",
                                     null /*alias */, templateElements,  // 
(#PCDATA %instructions; %result-elements;)*
  @@ -607,15 +670,15 @@
                                      new XSLTAttributeDef[]{ nameAttrRequired 
},
                                      new ProcessorFunction(),
                                      ElemFunction.class /* class object */);
  -    
  -    XSLTElementDef xslPrincipalResultDocument = 
  -                                 new XSLTElementDef(this,
  -                                 Constants.S_XSLNAMESPACEURL, 
"principal-result-document",
  -                                 null /*alias */,
  -                                 templateElements,
  -                                 new XSLTAttributeDef[]{resultDocFormatAttr, 
hrefAttrOpt},
  -                                 new ProcessorResultDocument(),
  -                                 ElemPrincipalResultDocument.class);
  + // Removed?  Ilene - Dec 02/02   
  +//    XSLTElementDef xslPrincipalResultDocument = 
  +//                                 new XSLTElementDef(this,
  +//                                 Constants.S_XSLNAMESPACEURL, 
"principal-result-document",
  +//                                 null /*alias */,
  +//                                 templateElements,
  +//                                 new 
XSLTAttributeDef[]{resultDocFormatAttr, hrefAttrOpt},
  +//                                 new ProcessorResultDocument(),
  +//                                 ElemPrincipalResultDocument.class);
   
       XSLTElementDef xslResultDocument = 
                                    new XSLTElementDef(this,
  @@ -643,8 +706,8 @@
       templateElements[i++] = xslCallTemplate;
       templateElements[i++] = xslApplyImports;
       templateElements[i++] = xslForEach;
  -     templateElements[i++] = xslForEachGroup;
  -     templateElements[i++] = xslAnalyzeString;
  +    templateElements[i++] = xslForEachGroup;
  +    templateElements[i++] = xslAnalyzeString;
       templateElements[i++] = xslValueOf;
       templateElements[i++] = xslCopyOf;
       templateElements[i++] = xslNumber;
  @@ -688,7 +751,7 @@
       charTemplateElements[i++] = xslCallTemplate;
       charTemplateElements[i++] = xslApplyImports;
       charTemplateElements[i++] = xslForEach;
  -     charTemplateElements[i++] = xslForEachGroup;
  +    charTemplateElements[i++] = xslForEachGroup;
       charTemplateElements[i++] = xslValueOf;
       charTemplateElements[i++] = xslCopyOf;
       charTemplateElements[i++] = xslNumber;
  @@ -868,34 +931,34 @@
                                                                   null,
                                                                   "lang",
                                                                   
XSLTAttributeDef.T_NMTOKEN,
  -                                                                true),
  +                                                                true, false, 
XSLTAttributeDef.ERROR),
                                                               new 
XSLTAttributeDef(
  -                                                                null, "src", 
XSLTAttributeDef.T_URL, false) }, 
  +                                                                null, "src", 
XSLTAttributeDef.T_URL, false, false, XSLTAttributeDef.ERROR) }, 
                                                                   new 
ProcessorLRE(),
                                                                   
ElemExtensionScript.class /* class object */, 20, true) },  // EMPTY
                                                               new 
XSLTAttributeDef[]{ 
                                                                   new 
XSLTAttributeDef(
  -                                                                    null, 
"prefix", XSLTAttributeDef.T_NMTOKEN, true),
  +                                                                    null, 
"prefix", XSLTAttributeDef.T_NMTOKEN, true, false, XSLTAttributeDef.ERROR),
                                                                   new 
XSLTAttributeDef(
  -                                                                    null, 
"elements", XSLTAttributeDef.T_STRINGLIST, false),
  +                                                                    null, 
"elements", XSLTAttributeDef.T_STRINGLIST, false, false, 
XSLTAttributeDef.ERROR),
                                                                   new 
XSLTAttributeDef(
  -                                                                    null, 
"functions", XSLTAttributeDef.T_STRINGLIST, false) }, 
  +                                                                    null, 
"functions", XSLTAttributeDef.T_STRINGLIST, false, false, 
XSLTAttributeDef.ERROR) }, 
                                                       new ProcessorLRE(), 
ElemExtensionDecl.class /* class object */),
                                     exsltFunction, xslFunction/* exslt, 
stylesheet function*/,
  -                                  xslPrincipalResultDocument};  //end of 
topevelElements
  +                                 };        //xslPrincipalResultDocument};  
//end of topevelElements
       
       XSLTAttributeDef excludeResultPrefixesAttr =
         new XSLTAttributeDef(null, "exclude-result-prefixes",
  -                           XSLTAttributeDef.T_STRINGLIST, false);
  +                           XSLTAttributeDef.T_STRINGLIST, 
false,false,XSLTAttributeDef.WARNING);
       XSLTAttributeDef extensionElementPrefixesAttr =
         new XSLTAttributeDef(null, "extension-element-prefixes",
  -                           XSLTAttributeDef.T_PREFIX_URLLIST, false);
  +                           XSLTAttributeDef.T_PREFIX_URLLIST, 
false,false,XSLTAttributeDef.WARNING);
       XSLTAttributeDef idAttr = new XSLTAttributeDef(null, "id",
  -                                XSLTAttributeDef.T_CDATA, false);
  +                                XSLTAttributeDef.T_CDATA, 
false,false,XSLTAttributeDef.WARNING);
       XSLTAttributeDef versionAttrRequired = new XSLTAttributeDef(null,
                                                "version",
                                                XSLTAttributeDef.T_NMTOKEN,
  -                                             true);
  +                                             
true,false,XSLTAttributeDef.WARNING);
       XSLTElementDef stylesheetElemDef = new XSLTElementDef(this,
                                            Constants.S_XSLNAMESPACEURL,
                                            "stylesheet", "transform",
  
  
  
  1.24.2.1.2.3 +602 -75   
xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java
  
  Index: XSLTAttributeDef.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java,v
  retrieving revision 1.24.2.1.2.2
  retrieving revision 1.24.2.1.2.3
  diff -u -r1.24.2.1.2.2 -r1.24.2.1.2.3
  --- XSLTAttributeDef.java     15 Aug 2002 15:48:58 -0000      1.24.2.1.2.2
  +++ XSLTAttributeDef.java     6 Dec 2002 18:14:52 -0000       1.24.2.1.2.3
  @@ -77,6 +77,7 @@
   import org.apache.xml.utils.StringVector;
   import org.apache.xml.utils.StringToIntTable;
   import org.apache.xpath.XPath;
  +import org.apache.xml.utils.XMLChar;
   
   import javax.xml.transform.TransformerException;
   
  @@ -87,6 +88,10 @@
    */
   public class XSLTAttributeDef
   {
  +   // How to handle invalid values for this attribute 
  +   static final int FATAL = 0;
  +   static final int ERROR = 1;
  +   static final int WARNING = 2;
   
     /**
      * Construct an instance of XSLTAttributeDef.
  @@ -94,17 +99,21 @@
      * @param namespace The Namespace URI, or an empty string.
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param type One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR,
  -   * T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST,
  -   * T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST.
  +   * T_NUMBER, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST,
  +   * T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST, T_ENUM_OR_PQNAME, T_NCNAME.
      * @param required true if this is attribute is required by the XSLT 
specification.
  +   * @param supportsAVT true if this attribute supports AVT's.
  +   * @param errorType the type of error to issue if validation fails.  One 
of FATAL, ERROR, WARNING. 
      */
  -  XSLTAttributeDef(String namespace, String name, int type, boolean required)
  +  XSLTAttributeDef(String namespace, String name, int type, boolean 
required, boolean supportsAVT, int errorType)
     {
   
       this.m_namespace = namespace;
       this.m_name = name;
       this.m_type = type;
       this.m_required = required;
  +    this.m_supportsAVT = supportsAVT;
  +    this.m_errorType = errorType;
     }
   
     /**
  @@ -113,17 +122,22 @@
      * @param namespace The Namespace URI, or an empty string.
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param type One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR,
  -   * T_CHAR, T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM,
  -   * T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST.
  +   * T_CHAR, T_NUMBER, T_YESNO, T_QNAME, T_QNAMES, T_ENUM,
  +   * T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST, 
  +   * T_ENUM_OR_PQNAME, T_NCNAME.
  +   * @param supportsAVT true if this attribute supports AVT's. 
  +   * @param errorType the type of error to issue if validation fails.  One 
of FATAL, ERROR, WARNING. 
      * @param defaultVal The default value for this attribute.
      */
  -  XSLTAttributeDef(String namespace, String name, int type, String 
defaultVal)
  +  XSLTAttributeDef(String namespace, String name, int type, boolean 
supportsAVT, int errorType, String defaultVal)
     {
   
       this.m_namespace = namespace;
       this.m_name = name;
       this.m_type = type;
       this.m_required = false;
  +    this.m_supportsAVT = supportsAVT;  
  +    this.m_errorType = errorType;      
       this.m_default = defaultVal;
     }
   
  @@ -134,19 +148,24 @@
      * @param namespace The Namespace URI, or an empty string.
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param required true if this attribute is required by the XSLT 
specification.
  +   * @param supportsAVT true if this attribute supports AVT's.  
  +   * @param prefixedQNameValAllowed If true, the type is T_ENUM_OR_PQNAME    
   
  +   * @param errorType the type of error to issue if validation fails.  One 
of FATAL, ERROR, WARNING. 
      * @param k1 The XSLT name of the enumerated value.
      * @param v1 An integer representation of k1.
      * @param k2 The XSLT name of the enumerated value.
      * @param v2 An integer representation of k2.
  -   */
  -  XSLTAttributeDef(String namespace, String name, boolean required,
  -                   String k1, int v1, String k2, int v2)
  +    */
  +  XSLTAttributeDef(String namespace, String name, boolean required, boolean 
supportsAVT, 
  +                    boolean prefixedQNameValAllowed, int errorType, String 
k1, int v1, String k2, int v2)
     {
   
       this.m_namespace = namespace;
       this.m_name = name;
  -    this.m_type = this.T_ENUM;
  +     this.m_type = prefixedQNameValAllowed ? this.T_ENUM_OR_PQNAME : 
this.T_ENUM;    
       this.m_required = required;
  +    this.m_supportsAVT = supportsAVT;    
  +    this.m_errorType = errorType;    
       m_enums = new StringToIntTable(2);
   
       m_enums.put(k1, v1);
  @@ -160,6 +179,9 @@
      * @param namespace The Namespace URI, or an empty string.
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param required true if this attribute is required by the XSLT 
specification.
  +   * @param supportsAVT true if this attribute supports AVT's.
  +   * @param prefixedQNameValAllowed If true, the type is T_ENUM_OR_PQNAME
  +   * @param errorType the type of error to issue if validation fails.  One 
of FATAL, ERROR, WARNING.    * 
      * @param k1 The XSLT name of the enumerated value.
      * @param v1 An integer representation of k1.
      * @param k2 The XSLT name of the enumerated value.
  @@ -167,14 +189,16 @@
      * @param k3 The XSLT name of the enumerated value.
      * @param v3 An integer representation of k3.
      */
  -  XSLTAttributeDef(String namespace, String name, boolean required,
  -                   String k1, int v1, String k2, int v2, String k3, int v3)
  +  XSLTAttributeDef(String namespace, String name, boolean required, boolean 
supportsAVT,
  +                    boolean prefixedQNameValAllowed, int errorType, String 
k1, int v1, String k2, int v2, String k3, int v3)
     {
   
       this.m_namespace = namespace;
       this.m_name = name;
  -    this.m_type = this.T_ENUM;
  +     this.m_type = prefixedQNameValAllowed ? this.T_ENUM_OR_PQNAME : 
this.T_ENUM;    
       this.m_required = required;
  +    this.m_supportsAVT = supportsAVT; 
  +    this.m_errorType = errorType;      
       m_enums = new StringToIntTable(3);
   
       m_enums.put(k1, v1);
  @@ -189,7 +213,9 @@
      * @param namespace The Namespace URI, or an empty string.
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param required true if this attribute is required by the XSLT 
specification.
  -   * @param k1 The XSLT name of the enumerated value.
  +   * @param supportsAVT true if this attribute supports AVT's.
  +   * @param prefixedQNameValAllowed If true, the type is T_ENUM_OR_PQNAME
  +   * @param errorType the type of error to issue if validation fails.  One 
of FATAL, ERROR, WARNING.    * @param k1 The XSLT name of the enumerated value.
      * @param v1 An integer representation of k1.
      * @param k2 The XSLT name of the enumerated value.
      * @param v2 An integer representation of k2.
  @@ -198,15 +224,17 @@
      * @param k4 The XSLT name of the enumerated value.
      * @param v4 An integer representation of k4.
      */
  -  XSLTAttributeDef(String namespace, String name, boolean required,
  -                   String k1, int v1, String k2, int v2, String k3, int v3,
  -                   String k4, int v4)
  +  XSLTAttributeDef(String namespace, String name, boolean required, boolean 
supportsAVT,
  +                   boolean prefixedQNameValAllowed, int errorType, String 
k1, int v1, String k2, int v2, 
  +                   String k3, int v3, String k4, int v4)
     {
   
       this.m_namespace = namespace;
       this.m_name = name;
  -    this.m_type = this.T_ENUM;
  +     this.m_type = prefixedQNameValAllowed ? this.T_ENUM_OR_PQNAME : 
this.T_ENUM;    
       this.m_required = required;
  +    this.m_supportsAVT = supportsAVT;      
  +    this.m_errorType = errorType; 
       m_enums = new StringToIntTable(4);
   
       m_enums.put(k1, v1);
  @@ -235,8 +263,8 @@
     // of a single character.-->
     T_CHAR = 6,
   
  -  // <!-- Used for the type of an attribute value that is a priority. -->
  -  T_PRIORITY = 7,
  +  // <!-- Used for the type of an attribute value that is a number. -->
  +  T_NUMBER = 7,
   
     // Used for boolean values
     T_YESNO = 8,
  @@ -245,7 +273,8 @@
     // gets expanded by the XSLT processor. -->
     T_QNAME = 9,
   
  -  // <!-- Like qname but a whitespace-separated list of QNames. -->
  +  // <!--Used for a whitespace-separated list of QNames where the 
non-prefixed
  +  // entries are not to be placed in the default namespace. -->
     T_QNAMES = 10,
   
     // <!-- Used for enumerated values -->
  @@ -261,11 +290,23 @@
     T_STRINGLIST = 14,
   
     // Used for a list of white-space delimited strings.
  -  T_PREFIX_URLLIST = 15;
  +  T_PREFIX_URLLIST = 15,
  +  // Used for enumerated values, one of which could be a qname-but-not-ncname
  +  T_ENUM_OR_PQNAME = 16,
  +
  +  // Used for the type of an attribute value that is a NCName
  +  T_NCNAME = 17,
  +  
  +  // Used for QName attributes that are always AVT.  Prefix isn't resolved.
  +  T_AVT_QNAME = 18,
  +  
  +  // Used for a list of QNames where non-prefixed items are to be resolved
  +  // using the default namespace (This is only true for 
cdata-section-elements)
  +  T_QNAMES_RESOLVE_NULL = 19;
   
     /** Representation for an attribute in a foreign namespace. */
     static XSLTAttributeDef m_foreignAttr = new XSLTAttributeDef("*", "*",
  -                                            XSLTAttributeDef.T_CDATA, false);
  +                                            XSLTAttributeDef.T_CDATA,false, 
false, WARNING);
   
     /** Method name that objects may implement if they wish to have forein 
attributes set. */
     static String S_FOREIGNATTR_SETTER = "setForeignAttr";
  @@ -309,8 +350,8 @@
      * Get the type of this attribute value.
      *
      * @return One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR,
  -   * T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST,
  -   * T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST.
  +   * T_NUMBER, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST,
  +   * T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST, T_ENUM_OR_PQNAME.
      */
     int getType()
     {
  @@ -339,6 +380,19 @@
     }
   
     /**
  +   * If this element is of type T_ENUM, this will return
  +   * an array of strings - the values in the enumeration
  +   *
  +   * @return An array of the enumerated values permitted for this attribute.
  +   *
  +   * @throws Throws NullPointerException if m_enums is null.
  +   */
  +  private String[] getEnumNames()
  +  {
  +    return m_enums.keys();
  +  }
  +
  +  /**
      * The default value for this attribute.
      */
     private String m_default;
  @@ -379,6 +433,32 @@
     }
   
     /**
  +   * If true, this is attribute supports AVT's.
  +   */
  +  private boolean m_supportsAVT;
  +
  +  /**
  +   * Get whether or not this attribute supports AVT's.
  +   *
  +   * @return true if this attribute supports AVT's.
  +   */
  +  boolean getSupportsAVT()
  +  {
  +    return m_supportsAVT;
  +  }
  +  
  +  int m_errorType = this.WARNING;
  +  
  +  /**
  +   * Get the type of error message to use if the attribute value is invalid.
  +   *
  +   * @return one of XSLAttributeDef.FATAL, XSLAttributeDef.ERROR, 
XSLAttributeDef.WARNING
  +   */
  +  int getErrorType()
  +  {
  +    return m_errorType;
  +  }
  +  /**
      * String that should represent the setter method which which
      * may be used on objects to set a value that represents this attribute  
      */
  @@ -492,11 +572,26 @@
      * @param value non-null string reference.
      *
      * @return The value argument.
  +   * 
  +   * @throws org.xml.sax.SAXException.
      */
     Object processCDATA(StylesheetHandler handler, String uri, String name,
  -                      String rawName, String value)
  +                      String rawName, String value, ElemTemplateElement 
owner)
  +                      throws org.xml.sax.SAXException
     {
  -    return value;
  +     if (getSupportsAVT()) {
  +         try
  +         {
  +           AVT avt = new AVT(handler, uri, name, rawName, value, owner);
  +           return avt;
  +         }
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         }           
  +     } else {                
  +         return value;
  +     }
     }
   
     /**
  @@ -514,22 +609,38 @@
      * @throws org.xml.sax.SAXException if the string is not a length of 1.
      */
     Object processCHAR(
  -          StylesheetHandler handler, String uri, String name, String 
rawName, String value)
  +          StylesheetHandler handler, String uri, String name, String 
rawName, String value, ElemTemplateElement owner)
               throws org.xml.sax.SAXException
     {
  +     if (getSupportsAVT()) {
  +         try
  +         {
  +           AVT avt = new AVT(handler, uri, name, rawName, value, owner);
  +     
  +               // If an AVT wasn't used, validate the value
  +               if ((avt.isSimple()) && (value.length() != 1)) {
  +                     handleError(handler, XSLTErrorResources.INVALID_TCHAR, 
new Object[] {name, value},null);
  +            return null;
  +               }     
  +           return avt;
  +         }
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         }
  +     } else {    
  +         if (value.length() != 1)
  +         {
  +            handleError(handler, XSLTErrorResources.INVALID_TCHAR, new 
Object[] {name, value},null);
  +            return null;
  +         }
   
  -    if (value.length() != 1)
  -    {
  -      handler.error(
  -        "An XSLT attribute of type T_CHAR must be only 1 character!", null);
  -    }
  -
  -    return new Character(value.charAt(0));
  +         return new Character(value.charAt(0));
  +     }
     }
   
     /**
  -   * Process an attribute string of type T_ENUM into
  -   * a int value.
  +   * Process an attribute string of type T_ENUM into a int value.
      *
      * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param uri The Namespace URI, or an empty string.
  @@ -537,16 +648,126 @@
      * @param rawName The qualified name (with prefix).
      * @param value non-null string that represents an enumerated value that is
      * valid for this element.
  +   * @param owner
      *
  -   * @return An Integer representation of the enumerated value.
  +   * @return An Integer representation of the enumerated value if this 
attribute does not support
  +   *         AVT.  Otherwise, and AVT is returned.
      */
     Object processENUM(StylesheetHandler handler, String uri, String name,
  -                     String rawName, String value)
  +                     String rawName, String value, ElemTemplateElement owner)
  +                     throws org.xml.sax.SAXException
     {
   
  -    int enum = this.getEnum(value);
  +     AVT avt = null;
  +     if (getSupportsAVT()) {
  +         try
  +         {
  +           avt = new AVT(handler, uri, name, rawName, value, owner);
  +           
  +           // If this attribute used an avt, then we can't validate at this 
time.
  +           if (!avt.isSimple()) return avt;
  +         }
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         }
  +     }    
  +     
  +    int retVal = this.getEnum(value);
  +    
  +     if (retVal == StringToIntTable.INVALID_KEY) 
  +    {
  +       StringBuffer enumNamesList = getListOfEnums();
  +       handleError(handler, XSLTErrorResources.INVALID_ENUM,new 
Object[]{name, value, enumNamesList.toString() },null);
  +       return null;
  +    }
  +
  +     if (getSupportsAVT()) return avt;
  +     else return new Integer(retVal);        
  +
  +  }
   
  -    return new Integer(enum);
  +  /**
  +   * Process an attribute string of that is either an enumerated value or a 
qname-but-not-ncname.
  +   * Returns an AVT, if this attribute support AVT; otherwise returns int or 
qname.
  +   *
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value non-null string that represents an enumerated value that is
  +   * valid for this element.
  +   * @param owner
  +   *
  +   * @return AVT if attribute supports AVT. An Integer representation of the 
enumerated value if
  +   *         attribute does not support AVT and an enumerated value was 
used.  Otherwise a qname
  +   *         is returned.
  +   */
  +  Object processENUM_OR_PQNAME(StylesheetHandler handler, String uri, String 
name,
  +                     String rawName, String value, ElemTemplateElement owner)
  +                     throws org.xml.sax.SAXException
  +  {
  +
  +     Object objToReturn = null;
  +     
  +     if (getSupportsAVT()) {
  +         try
  +         {
  +           AVT avt = new AVT(handler, uri, name, rawName, value, owner);
  +           if (!avt.isSimple()) return avt;
  +           else objToReturn = avt;
  +         }  
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         }
  +     }    
  +     
  +    // An avt wasn't used.
  +     int enum = this.getEnum(value);
  +    
  +    if (enum != StringToIntTable.INVALID_KEY) 
  +    {
  +        if (objToReturn == null) objToReturn = new Integer(enum);
  +    }
  +
  +    // enum not used.  Validate qname-but-not-ncname.
  +    else
  +    {
  +        try 
  +        {
  +                     QName qname = new QName(value, handler, true);
  +            if (objToReturn == null) objToReturn = qname;    
  +             
  +                     if (qname.getPrefix() == null) {
  +                StringBuffer enumNamesList = getListOfEnums();
  +
  +                enumNamesList.append(" <qname-but-not-ncname>");
  +               handleError(handler,XSLTErrorResources.INVALID_ENUM,new 
Object[]{name, value, enumNamesList.toString() },null); 
  +               return null;
  +        
  +             }            
  +        }
  +        catch (IllegalArgumentException ie) 
  +        {
  +           StringBuffer enumNamesList = getListOfEnums();
  +           enumNamesList.append(" <qname-but-not-ncname>");
  +           
  +           handleError(handler,XSLTErrorResources.INVALID_ENUM,new 
Object[]{name, value, enumNamesList.toString() },ie); 
  +           return null;
  +
  +        }
  +        catch (RuntimeException re)
  +        {
  +           StringBuffer enumNamesList = getListOfEnums();
  +           enumNamesList.append(" <qname-but-not-ncname>");
  +
  +           handleError(handler,XSLTErrorResources.INVALID_ENUM,new 
Object[]{name, value, enumNamesList.toString() },re); 
  +           return null;
  +        }    
  +     }
  +     
  +     return objToReturn;
     }
   
     /**
  @@ -594,11 +815,37 @@
      * @param rawName The qualified name (with prefix).
      * @param value A NMTOKEN string.
      *
  -   * @return the value argument.
  +   * @return the value argument or an AVT if this attribute supports AVTs.
  +   * 
  +   * @throws org.xml.sax.SAXException if the value is not a valid nmtoken
      */
     Object processNMTOKEN(StylesheetHandler handler, String uri, String name,
  -                        String rawName, String value)
  +                        String rawName, String value, ElemTemplateElement 
owner)
  +             throws org.xml.sax.SAXException
     {
  +     
  +     if (getSupportsAVT()) {
  +         try
  +         {
  +           AVT avt = new AVT(handler, uri, name, rawName, value, owner);
  +     
  +               // If an AVT wasn't used, validate the value
  +               if ((avt.isSimple()) && (!XMLChar.isValidNmtoken(value))) {
  +            handleError(handler,XSLTErrorResources.INVALID_NMTOKEN, new 
Object[] {name,value},null);
  +            return null;
  +               }     
  +           return avt;
  +         }
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         }           
  +     } else {
  +             if (!XMLChar.isValidNmtoken(value)) {
  +            handleError(handler,XSLTErrorResources.INVALID_NMTOKEN, new 
Object[] {name,value},null);
  +            return null;
  +             }
  +     }                               
       return value;
     }
   
  @@ -637,7 +884,7 @@
     }
   
     /**
  -   * Process an attribute string of type T_PRIORITY into
  +   * Process an attribute string of type T_NUMBER into
      * a double value.
      *
      * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  @@ -645,6 +892,7 @@
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param rawName The qualified name (with prefix).
      * @param value A string that can be parsed into a double value.
  +   * @param number
      *
      * @return A Double object.
      *
  @@ -652,49 +900,207 @@
      * [EMAIL PROTECTED] javax.xml.transform.TransformerException}
      * if the string does not contain a parsable number.
      */
  -  Object processPRIORITY(
  -          StylesheetHandler handler, String uri, String name, String 
rawName, String value)
  +  Object processNUMBER(
  +          StylesheetHandler handler, String uri, String name, String 
rawName, String value, ElemTemplateElement owner)
               throws org.xml.sax.SAXException
     {
   
  +     if (getSupportsAVT()) 
  +     {
  +             Double val;
  +             AVT avt = null;
  +         try
  +         {
  +           avt = new AVT(handler, uri, name, rawName, value, owner);
  +           
  +           // If this attribute used an avt, then we can't validate at this 
time.
  +           if (avt.isSimple()) 
  +           {
  +             val = Double.valueOf(value);
  +           }
  +         }
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         } 
  +         catch (NumberFormatException nfe)
  +         {
  +             handleError(handler,XSLTErrorResources.INVALID_NUMBER, new 
Object[] {name, value}, nfe);
  +            return null;
  +         }
  +         return avt;
  +     
  +     } 
  +     else
  +    {
       try
       {
         return Double.valueOf(value);
       }
       catch (NumberFormatException nfe)
       {
  -      handler.error(XSLTErrorResources.ER_PRIORITY_NOT_PARSABLE, null, 
nfe);//"Priority value does not contain a parsable number.",
  -                    //nfe);
  -
  -      return new Double(0.0);
  +            handleError(handler,XSLTErrorResources.INVALID_NUMBER, new 
Object[] {name, value}, nfe);
  +            return null;
  +         }
       }
     }
   
     /**
  -   * Process an attribute string of type T_QNAME into
  -   * a QName value.
  +   * Process an attribute string of type T_QNAME into a QName value.
      *
      * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param uri The Namespace URI, or an empty string.
      * @param name The local name (without prefix), or empty string if not 
namespace processing.
      * @param rawName The qualified name (with prefix).
      * @param value A string that represents a potentially prefix qualified 
name.
  +   * @param owner
      *
  -   * @return A QName object.
  +   * @return A QName object if this attribute does not support AVT's.  
Otherwise, an AVT
  +   *         is returned.
      *
      * @throws org.xml.sax.SAXException if the string contains a prefix that 
can not be
      * resolved, or the string contains syntax that is invalid for a qualified 
name.
      */
     Object processQNAME(
  -          StylesheetHandler handler, String uri, String name, String 
rawName, String value)
  +          StylesheetHandler handler, String uri, String name, String 
rawName, String value, ElemTemplateElement owner)
               throws org.xml.sax.SAXException
     {
  -    return new QName(value, handler);
  +
  +     try 
  +        {    
  +           QName qname = new QName(value, handler, true);
  +          return qname;
  +        }
  +        catch (IllegalArgumentException ie)
  +        {
  +            // thrown by QName constructor
  +            handleError(handler,XSLTErrorResources.INVALID_QNAME, new 
Object[] {name, value},ie);
  +            return null;
  +        }
  +        catch (RuntimeException re) {
  +            // thrown by QName constructor
  +            handleError(handler,XSLTErrorResources.INVALID_QNAME, new 
Object[] {name, value},re);
  +            return null;
  +        }
  +     }
  + 
  +
  +  /**
  +   * Process an attribute string of type T_QNAME into a QName value.
  +   *
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A string that represents a potentially prefix qualified 
name.
  +   * @param owner
  +   *
  +   * @return An AVT is returned.
  +   *
  +   * @throws org.xml.sax.SAXException if the string contains a prefix that 
can not be
  +   * resolved, or the string contains syntax that is invalid for a qualified 
name.
  +   */
  +  Object processAVT_QNAME(
  +          StylesheetHandler handler, String uri, String name, String 
rawName, String value, ElemTemplateElement owner)
  +            throws org.xml.sax.SAXException
  +  {
  +
  +       AVT avt = null;
  +       try
  +       {
  +          avt = new AVT(handler, uri, name, rawName, value, owner);
  +    
  +          // If an AVT wasn't used, validate the value
  +          if (avt.isSimple())
  +          {
  +             int indexOfNSSep = value.indexOf(':');
  +
  +             if (indexOfNSSep >= 0) 
  +             {   
  +                  String prefix = value.substring(0, indexOfNSSep);
  +                  if (!XMLChar.isValidNCName(prefix))
  +                  {
  +                     
handleError(handler,XSLTErrorResources.INVALID_QNAME,new Object[]{name,value 
},null);
  +                     return null;
  +                  }
  +             }
  +                 
  +             String localName =  (indexOfNSSep < 0)
  +                 ? value : value.substring(indexOfNSSep + 1); 
  +             
  +             if ((localName == null) || (localName.length() == 0) ||
  +                 (!XMLChar.isValidNCName(localName)))
  +             {    
  +                     
handleError(handler,XSLTErrorResources.INVALID_QNAME,new Object[]{name,value 
},null );
  +                     return null;
  +             }
  +          }  
  +        }
  +        catch (TransformerException te)
  +        {
  +           // thrown by AVT constructor
  +          throw new org.xml.sax.SAXException(te);
  +        } 
  +    
  +    return avt;
     }
   
     /**
  -   * Process an attribute string of type T_QNAMES into
  +   * Process an attribute string of type NCName into a String
      * a vector of QNames.
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A string that represents a potentially prefix qualified 
name.
  +   * @param owner
  +   *
  +   * @return A String object if this attribute does not support AVT's.  
Otherwise, an AVT
  +   *         is returned.
  +   *
  +   * @throws org.xml.sax.SAXException if the string contains a prefix that 
can not be
  +   * resolved, or the string contains syntax that is invalid for a NCName.
  +   */
  +  Object processNCNAME(
  +          StylesheetHandler handler, String uri, String name, String 
rawName, String value, ElemTemplateElement owner)
  +            throws org.xml.sax.SAXException
  +  {
  +    
  +    if (getSupportsAVT()) 
  +    {
  +        AVT avt = null;
  +        try
  +        {
  +          avt = new AVT(handler, uri, name, rawName, value, owner);
  +    
  +          // If an AVT wasn't used, validate the value
  +          if ((avt.isSimple()) &&  (!XMLChar.isValidNCName(value))) 
  +          {
  +             handleError(handler,XSLTErrorResources.INVALID_NCNAME,new 
Object[] {name,value},null);
  +             return null;
  +          }      
  +          return avt;
  +        }
  +        catch (TransformerException te)
  +        {
  +           // thrown by AVT constructor
  +          throw new org.xml.sax.SAXException(te);
  +        } 
  +        
  +    } else {
  +        if (!XMLChar.isValidNCName(value)) 
  +        {
  +            handleError(handler,XSLTErrorResources.INVALID_NCNAME,new 
Object[] {name,value},null);
  +            return null;
  +        }
  +        return value;
  +    }
  + }
  +
  +  /**
  +   * Process an attribute string of type T_QNAMES into a vector of QNames 
where
  +   * the specification requires that non-prefixed elements not be placed in a
  +   * namespace.  (See section 2.4 of XSLT 1.0.)
      *
      * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param uri The Namespace URI, or an empty string.
  @@ -727,6 +1133,47 @@
     }
   
     /**
  +   * Process an attribute string of type T_QNAMES_RESOLVE_NULL into a vector
  +   * of QNames where the specification requires non-prefixed elements to be
  +   * placed in the default namespace.  (See section 16 of XSLT 1.0; the
  +   * <em>only</em> time that this will get called is for the
  +   * <code>cdata-section-elements</code> attribute on 
<code>xsl:output</code>.
  +   *
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A whitespace delimited list of qualified names.
  +   *
  +   * @return a Vector of QName objects.
  +   *
  +   * @throws org.xml.sax.SAXException if the one of the qualified name 
strings
  +   * contains a prefix that can not be resolved, or a qualified name contains
  +   * syntax that is invalid for a qualified name.
  +   */
  +  final Vector processQNAMESRNU(StylesheetHandler handler, String uri,
  +    String name, String rawName, String value)
  +    throws org.xml.sax.SAXException
  +  {
  +
  +    StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  +    int nQNames = tokenizer.countTokens();
  +    Vector qnames = new Vector(nQNames);
  +
  +    String defaultURI = handler.getNamespaceForPrefix("");
  +    for (int i = 0; i < nQNames; i++)
  +    {
  +      String tok = tokenizer.nextToken();
  +      if (tok.indexOf(':') == -1) {
  +        qnames.addElement(new QName(defaultURI,tok));
  +      } else {
  +        qnames.addElement(new QName(tok, handler));
  +      }
  +    }
  +    return qnames;
  +  }
  +
  +  /**
      * Process an attribute string of type T_SIMPLEPATTERNLIST into
      * a vector of XPath match patterns.
      *
  @@ -826,7 +1273,11 @@
         String prefix = tokenizer.nextToken();
         String url = handler.getNamespaceForPrefix(prefix);
   
  -      strings.addElement(url);
  +      if (url != null)
  +        strings.addElement(url);
  +      else
  +        throw new 
org.xml.sax.SAXException(XSLMessages.createMessage(XSLTErrorResources.ER_CANT_RESOLVE_NSPREFIX,
 new Object[] {prefix}));
  +    
       }
   
       return strings;
  @@ -843,18 +1294,39 @@
      * @param value non-null string that conforms to the URL syntax.
      *
      * @return The non-absolutized URL argument, in other words, the value 
argument.
  +   *         attribute supports AVT, an AVT is returned.
      *
      * @throws org.xml.sax.SAXException if the URL does not conform to the URL 
syntax.
      */
  -  String processURL(
  -          StylesheetHandler handler, String uri, String name, String 
rawName, String value)
  +  Object processURL(
  +          StylesheetHandler handler, String uri, String name, String 
rawName, String value, ElemTemplateElement owner)
               throws org.xml.sax.SAXException
     {
   
  +    if (getSupportsAVT()) {
  +         try
  +         {
  +           AVT avt = new AVT(handler, uri, name, rawName, value, owner);
  +     
  +               // If an AVT wasn't used, validate the value
  +              // if (avt.getSimpleString() != null) {
  +                        // TODO: syntax check URL value.
  +                         // return SystemIDResolver.getAbsoluteURI(value, 
  +                         //                                         
handler.getBaseIdentifier());
  +               //}   
  +           return avt;
  +         }
  +         catch (TransformerException te)
  +         {
  +           throw new org.xml.sax.SAXException(te);
  +         }           
  +     } else {
       // TODO: syntax check URL value.
       // return SystemIDResolver.getAbsoluteURI(value, 
       //                                         handler.getBaseIdentifier());
  -    return value;
  +             
  +         return value;
  +    }
     }
   
     /**
  @@ -878,10 +1350,12 @@
   
       // Is this already checked somewhere else?  -sb
       if (!(value.equals("yes") || value.equals("no")))
  -      handler.error(XSLTErrorResources.ER_VALUE_SHOULD_EQUAL, new 
Object[]{name}, null);//"Value for " + name + " should equal 'yes' or 'no'",
  -                    //null);
  +    {
  +      handleError(handler, XSLTErrorResources.INVALID_BOOLEAN, new Object[] 
{name,value}, null);
  +      return null;
  +   }
   
  -    return new Boolean(value.equals("yes") ? true : false);
  +     return new Boolean(value.equals("yes") ? true : false);
     }
   
     /**
  @@ -912,38 +1386,41 @@
         processedValue = processAVT(handler, uri, name, rawName, value, owner);
         break;
       case T_CDATA :
  -      processedValue = processCDATA(handler, uri, name, rawName, value);
  +      processedValue = processCDATA(handler, uri, name, rawName, value, 
owner);
         break;
       case T_CHAR :
  -      processedValue = processCHAR(handler, uri, name, rawName, value);
  +      processedValue = processCHAR(handler, uri, name, rawName, value, 
owner);
         break;
       case T_ENUM :
  -      processedValue = processENUM(handler, uri, name, rawName, value);
  +      processedValue = processENUM(handler, uri, name, rawName, value, 
owner);
         break;
       case T_EXPR :
         processedValue = processEXPR(handler, uri, name, rawName, value, 
owner);
         break;
       case T_NMTOKEN :
  -      processedValue = processNMTOKEN(handler, uri, name, rawName, value);
  +      processedValue = processNMTOKEN(handler, uri, name, rawName, value, 
owner);
         break;
       case T_PATTERN :
         processedValue = processPATTERN(handler, uri, name, rawName, value, 
owner);
         break;
  -    case T_PRIORITY :
  -      processedValue = processPRIORITY(handler, uri, name, rawName, value);
  +    case T_NUMBER :
  +      processedValue = processNUMBER(handler, uri, name, rawName, value, 
owner);
         break;
       case T_QNAME :
  -      processedValue = processQNAME(handler, uri, name, rawName, value);
  +      processedValue = processQNAME(handler, uri, name, rawName, value, 
owner);
         break;
       case T_QNAMES :
         processedValue = processQNAMES(handler, uri, name, rawName, value);
         break;
  +     case T_QNAMES_RESOLVE_NULL:
  +      processedValue = processQNAMESRNU(handler, uri, name, rawName, value);
  +      break;
       case T_SIMPLEPATTERNLIST :
         processedValue = processSIMPLEPATTERNLIST(handler, uri, name, rawName,
                                                   value, owner);
         break;
       case T_URL :
  -      processedValue = processURL(handler, uri, name, rawName, value);
  +      processedValue = processURL(handler, uri, name, rawName, value, owner);
         break;
       case T_YESNO :
         processedValue = processYESNO(handler, uri, name, rawName, value);
  @@ -955,6 +1432,15 @@
         processedValue = processPREFIX_URLLIST(handler, uri, name, rawName,
                                                value);
         break;
  +    case T_ENUM_OR_PQNAME :
  +     processedValue = processENUM_OR_PQNAME(handler, uri, name, rawName, 
value, owner);
  +     break;
  +    case T_NCNAME :
  +        processedValue = processNCNAME(handler, uri, name, rawName, value, 
owner);
  +        break;
  +    case T_AVT_QNAME :
  +        processedValue = processAVT_QNAME(handler, uri, name, rawName, 
value, owner);
  +        break;
       default :
       }
   
  @@ -1034,6 +1520,26 @@
     }
   
     /**
  +   * StringBuffer containing comma delimited list of valid values for ENUM 
type.
  +   * Used to build error message.
  +   */
  +  private StringBuffer getListOfEnums() 
  +  {
  +     StringBuffer enumNamesList = new StringBuffer();            
  +     String [] enumValues = this.getEnumNames();
  +
  +     for (int i = 0; i < enumValues.length; i++)
  +     {
  +        if (i > 0)
  +        {
  +           enumNamesList.append(' ');
  +        }
  +        enumNamesList.append(enumValues[i]);
  +    }        
  +    return enumNamesList;
  +  }
  +
  +  /**
      * Set a value on an attribute.
      *
      * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  @@ -1045,13 +1551,13 @@
      *
      * @throws org.xml.sax.SAXException
      */
  -  void setAttrValue(
  +  boolean setAttrValue(
             StylesheetHandler handler, String attrUri, String attrLocalName, 
             String attrRawName, String attrValue, ElemTemplateElement elem)
               throws org.xml.sax.SAXException
     {
       if(attrRawName.equals("xmlns") || attrRawName.startsWith("xmlns:"))
  -      return;
  +      return true;
         
       if(null == elem.getParentElem())
       {
  @@ -1091,6 +1597,9 @@
           {
             Object value = processValue(handler, attrUri, attrLocalName,
                                         attrRawName, attrValue, elem);
  +          // If a warning was issued because the value for this attribute was
  +          // invalid, then the value will be null.  Just return
  +          if (null == value) return false;
                                         
             // First try to match with the primative value.
             Class[] argTypes = new Class[]{ getPrimativeClass(value) };
  @@ -1117,15 +1626,33 @@
         {
           if (!setterString.equals(S_FOREIGNATTR_SETTER))
             handler.error(XSLTErrorResources.ER_FAILED_CALLING_METHOD, new 
Object[]{setterString}, nsme);//"Failed calling " + setterString + " method!", 
nsme);
  +          return false;
         }
         catch (IllegalAccessException iae)
         {
           handler.error(XSLTErrorResources.ER_FAILED_CALLING_METHOD, new 
Object[]{setterString}, iae);//"Failed calling " + setterString + " method!", 
iae);
  +        return false;
         }
         catch (InvocationTargetException nsme)
         {
  -        handler.error(XSLTErrorResources.ER_FAILED_CALLING_METHOD, new 
Object[]{setterString}, nsme);//"Failed calling " + setterString + " method!", 
nsme);
  -      }
  +        handleError(handler, XSLTErrorResources.WG_ILLEGAL_ATTRIBUTE_VALUE,
  +            new Object[]{ Constants.ATTRNAME_NAME, getName()}, nsme);
  +        return false;
  +  }
  +}
  +    return true;
  +  }
  +  private void handleError(StylesheetHandler handler, int msg, Object [] 
args, Exception exc) throws org.xml.sax.SAXException
  +  {
  +    switch (getErrorType()) 
  +    {
  +        case (FATAL):
  +        case (ERROR):
  +                handler.error(msg, args, exc);          
  +                break;
  +        case (WARNING):
  +                handler.warn(msg, args);       
  +        default: break;
       }
     }
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.1.2.4 +177 -7    
xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.properties
  
  Index: XPATHErrorResources.properties
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.properties,v
  retrieving revision 1.7.2.1.2.3
  retrieving revision 1.7.2.1.2.4
  diff -u -r1.7.2.1.2.3 -r1.7.2.1.2.4
  --- XPATHErrorResources.properties    28 Oct 2002 16:17:34 -0000      
1.7.2.1.2.3
  +++ XPATHErrorResources.properties    6 Dec 2002 18:14:52 -0000       
1.7.2.1.2.4
  @@ -1,8 +1,49 @@
   # This file contains error and warning messages related to XPath Error 
Handling.
   # Many of the messages are referenced by integer value (to avoid more 
strings in the 
  -# class files) and the string keys formed at runtime.  In the case where the 
key is an 
  -# integer, the constant reference (that would be used in the code) is listed 
in a comment 
  -# above the tuple.
  +# in the class files) and the string keys formed at runtime.  In the case 
where
  +# the key is an integer, the constant reference (that would be used in the 
code)
  +# is listed in a comment above the tuple.
  +
  +#  1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of
  +#     components.
  +#     XSLT is an acronym for "XML Stylesheet Language: Transformations".
  +#     XSLTC is an acronym for XSLT Compiler.
  +#
  +#  2) A stylesheet is a description of how to transform an input XML document
  +#     into a resultant XML document (or HTML document or text).  The
  +#     stylesheet itself is described in the form of an XML document.
  +#
  +#  3) A template is a component of a stylesheet that is used to match a
  +#     particular portion of an input document and specifies the form of the
  +#     corresponding portion of the output document.
  +#
  +#  4) An element is a mark-up tag in an XML document; an attribute is a
  +#     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
  +#     "elem" is an element name, "attr" and "attr2" are attribute names with
  +#     the values "val" and "val2", respectively.
  +#
  +#  5) A namespace declaration is a special attribute that is used to 
associate
  +#     a prefix with a URI (the namespace).  The meanings of element names and
  +#     attribute names that use that prefix are defined with respect to that
  +#     namespace.
  +#
  +#  6) "Translet" is an invented term that describes the class file that
  +#     results from compiling an XML stylesheet into a Java class.
  +#
  +#  7) XPath is a specification that describes a notation for identifying
  +#     nodes in a tree-structured representation of an XML document.  An
  +#     instance of that notation is referred to as an XPath expression.
  +#
  +#  8) The context node is the node in the document with respect to which an
  +#     XPath expression is being evaluated.
  +#
  +#  9) An iterator is an object that traverses nodes in the tree, one at a 
time.
  +#
  +#  10) NCName is an XML term used to describe a name that does not contain a
  +#     colon (a "no-colon name").
  +#
  +#  11) QName is an XML term meaning "qualified name".
  +#
   
   # ER_ROR0000
   ER0000={0}
  @@ -176,12 +217,141 @@
   ER0084=2 or 3
   # ER_VARIABLE_ACCESSED_BEFORE_BIND
   ER0085=Variable accessed before it is bound!
  +# ER_FSB_CANNOT_TAKE_STRING 
  +ER0086=XStringForFSB can not take a string for an argument!
  +# ER_SETTING_WALKER_ROOT_T)_NULL 
  +ER0087=\n !!!! Error! Setting the root of a walker to null!!!
  +# ER_NODESETDTM_CANNOT_ITERATE
  +ER0088=This NodeSetDTM can not iterate to a previous node!
  +# ER_NODESET_CANNOT_ITERATE
  +ER0089=This NodeSet can not iterate to a previous node!
  +# ER_NODESETDTM_CANNOT_INDEX
  +ER0090=This NodeSetDTM can not do indexing or counting functions!
  +# ER_NODESET_CANNOT_INDEX
  +ER0091=This NodeSet can not do indexing or counting functions!
  +# ER_CANNOT_CALL_SETSHOULDCACHENODE
  +ER0092=Can not call setShouldCacheNodes after nextNode has been called!
  +# ER_ONLY_ALLOWS
  +ER0093={0} only allows {1} arguments
  +# ER_UNKNOWN_STEP
  +ER0094=Programmer's assertion in getNextStepPos: unknown stepType: {0}
  +
  +# Note to translators:  A relative location path is a form of XPath 
expression.
  +# The message indicates that such an expression was expected following the
  +# characters '/' or '//', but was not found.
  +# ER_EXPECTED_REL_LOC_PATH
  +ER0095=A relative location path was expected following the '/' or '//' token.
  +
  +# Note to translators:  A location path is a form of XPath expression.
  +# The message indicates that syntactically such an expression was expected, 
but
  +# the characters specified by the substitution text were encountered instead.
  +# ER_EXPECTED_LOC_PATH
  +ER0096=A location path was expected, but the following token was 
encountered\u003a  {0}
  +
  +# Note to translators:  A location step is part of an XPath expression.
  +# The message indicates that syntactically such an expression was expected
  +# following the specified characters.
  +# ER_EXPECTED_LOC_STEP
  +ER0097=A location step was expected following the '/' or '//' token.
  +# ER_EXPECTED_NODE_TEST
  +
  +# Note to translators:  A node test is part of an XPath expression that is
  +# used to test for particular kinds of nodes.  In this case, a node test that
  +# consists of an NCName followed by a colon and an asterisk or that consists
  +# of a QName was expected, but was not found.
  +ER0098=A node test that matches either NCName:* or QName was expected.
  +
  +# Note to translators:  A step pattern is part of an XPath expression.
  +# The message indicates that syntactically such an expression was expected,
  +# but the specified character was found in the expression instead.
  +# ER_EXPECTED_STEP_PATTERN
  +ER0099=A step pattern was expected, but '/' was encountered.
  +
  +# Note to translators:  A relative path pattern is part of an XPath 
expression.
  +# The message indicates that syntactically such an expression was expected,
  +# but was not found.
  +# ER_EXPECTED_REL_PATH_PATTERN
  +ER0100=A relative path pattern was expected.
  +
  +# Note to translators:  A QNAME has the syntactic form [NCName:]NCName
  +# The localname is the portion after the optional colon; the message 
indicates
  +# that there is a problem with that part of the QNAME.
  +# ER_ARG_LOCALNAME_INVALID
  +ER0101= Localname in QNAME should be a valid NCName   
  +
  +# Note to translators:  A QNAME has the syntactic form [NCName:]NCName
  +# The prefix is the portion before the optional colon; the message indicates
  +# that there is a problem with that part of the QNAME.
  +# ER_ARG_PREFIX_INVALID
  +ER0102=Prefix in QNAME should be a valid NCName 
  +
  +# Note to translators:  The substitution text is the name of a data type.  
The
  +# message indicates that a value of a particular type could not be converted
  +# to a value of type string.
  +# ER_CANT_CONVERT_TO_BOOLEAN
  +ER0103=Cannot convert {0} to a boolean.
  +
  +# Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and 
FIRST_ORDERED_NODE_TYPE.
  +# ER_CANT_CONVERT_TO_SINGLENODE.
  +ER0104=Cannot convert {0} to a single node. This getter applies to types 
ANY_UNORDERED_NODE_TYPE and FIRST_ORDERED_NODE_TYPE.   
  +
  +# Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and 
ORDERED_NODE_SNAPSHOT_TYPE.
  +# ER_CANT_GET_SNAPSHOT_LENGTH
  +ER0105=Cannot get snapshot length on type: {0}. This getter applies to types 
UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE.
  +
  +# ER_NON_ITERATOR_TYPE
  +ER0106=Cannot iterate over non-iterator type: {0}
  +
  +# Note to translators:  This message indicates that the document being 
operated
  +# upon changed, so the iterator object that was being used to traverse the
  +# document has now become invalid.
  +# ER_DOC_MUTATED
  +ER0107=Document mutated since result was returned. Iterator is invalid.
  +
  +# ER_INVALID_XPATH_TYPE
  +ER0108=Invalid XPath type argument: {0}
  +
  +# ER_EMPTY_XPATH_RESULT
  +ER0109=Empty XPath result object
  +
  +# ER_INCOMPATIBLE_TYPES
  +ER0110=The returned type: {0} cannot be coerced into the specified type: {1}
  +
  +# ER_NULL_RESOLVER
  +ER0111=Unable to resolve prefix with null prefix resolver.
  +
  +# Note to translators:  The substitution text is the name of a data type.  
The
  +# message indicates that a value of a particular type could not be converted
  +# to a value of type string.
  +# ER_CANT_CONVERT_TO_STRING
  +ER0112=Cannot convert {0} to a string.
  +
  +# ER_NON_SNAPSHOT_TYPE
  +# Note to translators: Do not translate snapshotItem,
  +# UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE.
  +ER0113=Cannot call snapshotItem on type: {0}. This method applies to types 
UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE.
  +
  +# Note to translators:  XPathEvaluator is a Java interface name.  An
  +# XPathEvaluator is created with respect to a particular XML document, and in
  +# this case the expression represented by this object was being evaluated 
with
  +# respect to a context node from a different document.
  +# ER_WRONG_DOCUMENT
  +ER0114=Context node does not belong to the document that is bound to this 
XPathEvaluator.
  +
  +# Note to translators:  The XPath expression cannot be evaluated with respect
  +# to this type of node.
  +# ER_WRONG_NODETYPE
  +ER0115=The context node type is not supported.
  +
  +# ER_XPATH_ERROR
  +ER0116=Unknown error in XPath
  +
   # ER_CANNOT_FIND_COLLATOR          
  -ER0086=Could not find Collator for {0}
  +ER0117=Could not find Collator for {0}
   # ER_INVALID_ARG_TO_COLLECTION
  -ER0087=Invalid argument to collection function {0}
  +ER0118=Invalid argument to collection function {0}
   # ER_CONTEXT_NOT_NODE
  -ER0088=Context item is not a node
  +ER0119=Context item is not a node
   
   # WG_LOCALE_NAME_NOT_HANDLED 
   WR0001=locale name in the format-number function not yet handled!
  @@ -235,4 +405,4 @@
   three=3
   oneortwo=1 or 2
   twoorthree=2 or 3
  -threeorfour=3 or 4
  \ No newline at end of file
  +threeorfour=3 or 4
  
  
  
  1.16.2.1.2.3 +102 -3    
xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.java
  
  Index: XPATHErrorResources.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.java,v
  retrieving revision 1.16.2.1.2.2
  retrieving revision 1.16.2.1.2.3
  diff -u -r1.16.2.1.2.2 -r1.16.2.1.2.3
  --- XPATHErrorResources.java  28 Oct 2002 16:17:34 -0000      1.16.2.1.2.2
  +++ XPATHErrorResources.java  6 Dec 2002 18:14:52 -0000       1.16.2.1.2.3
  @@ -464,15 +464,114 @@
     
   // Variable accessed before it is bound!
     public static final int ER_VARIABLE_ACCESSED_BEFORE_BIND = 85;
  +  // XStringForFSB can not take a string for an argument!
  +  public static final int ER_FSB_CANNOT_TAKE_STRING = 86;
  +  
  +  // Error! Setting the root of a walker to null!
  +  public static final int ER_SETTING_WALKER_ROOT_TO_NULL = 87;
  +  
  +  // This NodeSetDTM can not iterate to a previous node!
  +  public static final int ER_NODESETDTM_CANNOT_ITERATE = 88;
  +  
  +  // This NodeSet can not iterate to a previous node!
  +  public static final int ER_NODESET_CANNOT_ITERATE = 89;
  +
  +  // This NodeSetDTM can not do indexing or counting functions!
  +  public static final int ER_NODESETDTM_CANNOT_INDEX = 90;
  +  
  +  // This NodeSet can not do indexing or counting functions!
  +  public static final int ER_NODESET_CANNOT_INDEX = 91;
  +
  +  // Can not call setShouldCacheNodes after nextNode has been called!
  +  public static final int ER_CANNOT_CALL_SETSHOULDCACHENODE = 92;
  +  
  +  // {0} only allows {1} arguments
  +  public static final int ER_ONLY_ALLOWS = 93;
  +  
  +  // Programmer's assertion in getNextStepPos: unknown stepType: {0}
  +  public static final int ER_UNKNOWN_STEP = 94;
  +  
  +  /** Problem with RelativeLocationPath */
  +  public static final int ER_EXPECTED_REL_LOC_PATH = 95;
  +
  +
  +   /** Problem with LocationPath */
  +  public static final int ER_EXPECTED_LOC_PATH = 96;
  +
  +
  +   /** Problem with Step */
  +  public static final int ER_EXPECTED_LOC_STEP = 97;
  +
  +
  +   /** Problem with NodeTest */
  +  public static final int ER_EXPECTED_NODE_TEST = 98;
  +
  +
  +   /** Expected step pattern */
  +  public static final int ER_EXPECTED_STEP_PATTERN = 99;
  +
  +  
  +   /** Expected relative path pattern */
  +  public static final int ER_EXPECTED_REL_PATH_PATTERN = 100;
  +  
  +  /** localname in QNAME should be a valid NCName */  
  +  public static final int ER_ARG_LOCALNAME_INVALID = 101;
  +
  +  /** prefix in QNAME should be a valid NCName */
  +  public static final int ER_ARG_PREFIX_INVALID = 102;
  +
  + 
  +/** Field ER_CANT_CONVERT_TO_BOOLEAN          */
  +  public static final int ER_CANT_CONVERT_TO_BOOLEAN = 103;
  +  
  +  
  +/** Field ER_CANT_CONVERT_TO_SINGLENODE       */
  +  public static final int ER_CANT_CONVERT_TO_SINGLENODE = 104;  
  +
  +/** Field ER_CANT_GET_SNAPSHOT_LENGTH         */
  +  public static final int ER_CANT_GET_SNAPSHOT_LENGTH = 105;
  +  
  +/** Field ER_NON_ITERATOR_TYPE                */
  +  public static final int ER_NON_ITERATOR_TYPE        = 106;
  +
  +/** Field ER_DOC_MUTATED                      */
  +  public static final int ER_DOC_MUTATED              = 107;
  +  
  +/** Field ER_INVALID_XPATH_TYPE               */
  +  public static final int ER_INVALID_XPATH_TYPE       = 108;
  +  
  +/** Field ER_EMPTY_XPATH_RESULT                */
  +  public static final int ER_EMPTY_XPATH_RESULT       = 109;
  +
  +/** Field ER_INCOMPATIBLE_TYPES                */
  +  public static final int ER_INCOMPATIBLE_TYPES       = 110;  
  +  
  +/** Field ER_NULL_RESOLVER                     */
  +  public static final int ER_NULL_RESOLVER            = 111;
  +
  +/** Field ER_CANT_CONVERT_TO_STRING            */
  +  public static final int ER_CANT_CONVERT_TO_STRING   = 112;
  +  
  +/** Field ER_NON_SNAPSHOT_TYPE                 */
  +  public static final int ER_NON_SNAPSHOT_TYPE       = 113;
  +
  +/** Field ER_WRONG_DOCUMENT                    */
  +  public static final int ER_WRONG_DOCUMENT          = 114;
  + 
  +/** Field ER_WRONG_NODETYPE                    */
  +  public static final int ER_WRONG_NODETYPE          = 115; 
  +  
  +/** Field ER_XPATH_ERROR                       */  
  +  public static final int ER_XPATH_ERROR             = 116;
     
     /** ER_CANNOT_FIND_COLLATOR          */
  -  public static final int ER_CANNOT_FIND_COLLATOR = 86;
  +  public static final int ER_CANNOT_FIND_COLLATOR = 117;
     
     /** ER_INVALID_ARG_TO_COLLECTION          */
  -  public static final int ER_INVALID_ARG_TO_COLLECTION = 87;
  +  public static final int ER_INVALID_ARG_TO_COLLECTION = 118;
     
     /** ER_CONTEXT_NOT_NODE              */
  -  public static final int ER_CONTEXT_NOT_NODE = 88;
  +  public static final int ER_CONTEXT_NOT_NODE = 119;
      
     // Warnings...
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.1.2.1 +20 -3     
xml-xalan/java/src/org/apache/xml/utils/StringToIntTable.java
  
  Index: StringToIntTable.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/utils/StringToIntTable.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.1.2.1
  diff -u -r1.3.2.1 -r1.3.2.1.2.1
  --- StringToIntTable.java     14 Aug 2002 19:45:36 -0000      1.3.2.1
  +++ StringToIntTable.java     6 Dec 2002 18:14:52 -0000       1.3.2.1.2.1
  @@ -64,6 +64,7 @@
   public class StringToIntTable
   {
   
  +  public static final int INVALID_KEY = -10000;
     /** Block size to allocate          */
     private int m_blocksize;
   
  @@ -166,7 +167,7 @@
           return m_values[i];
       }
   
  -    return -10000;  // Bogus value, needs to throw exception.
  +     return INVALID_KEY;
     }
   
     /**
  @@ -180,7 +181,7 @@
     {
   
       if (null == key)
  -      return -10000;  // Bogus value, needs to throw exception.
  +        return INVALID_KEY;
   
       for (int i = 0; i < m_firstFree; i++)
       {
  @@ -188,7 +189,7 @@
           return m_values[i];
       }
   
  -    return -10000;  // Bogus value, needs to throw exception.
  +    return INVALID_KEY;
     }
   
     /**
  @@ -209,4 +210,20 @@
   
       return false;
     }
  +  /**
  +   * Return array of keys in the table.
  +   * 
  +   * @return Array of strings
  +   */
  +  public final String[] keys()
  +  {
  +    String [] keysArr = new String[m_firstFree];
  +
  +    for (int i = 0; i < m_firstFree; i++)
  +    {
  +      keysArr[i] = m_map[i];
  +    }
  +
  +    return keysArr;
  +  }  
   }
  
  
  
  1.9.2.1.2.1 +155 -1    xml-xalan/java/src/org/apache/xml/utils/QName.java
  
  Index: QName.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/QName.java,v
  retrieving revision 1.9.2.1
  retrieving revision 1.9.2.1.2.1
  diff -u -r1.9.2.1 -r1.9.2.1.2.1
  --- QName.java        14 Aug 2002 19:45:36 -0000      1.9.2.1
  +++ QName.java        6 Dec 2002 18:14:52 -0000       1.9.2.1.2.1
  @@ -125,11 +125,36 @@
      */
     public QName(String namespaceURI, String localName)
     {
  +    this(namespaceURI, localName, false); 
  +  }
   
  +  /**
  +   * Constructs a new QName with the specified namespace URI and
  +   * local name.
  +   *
  +   * @param namespaceURI The namespace URI if known, or null
  +   * @param localName The local name
  +   * @param validate If true the new QName will be validated and an 
IllegalArgumentException will
  +   *                 be thrown if it is invalid.
  +   */
  +  public QName(String namespaceURI, String localName, boolean validate) 
  +  {
  +
  +    // This check was already here.  So, for now, I will not add it to the 
validation
  +    // that is done when the validate parameter is true.
       if (localName == null)
         throw new IllegalArgumentException(XSLMessages.createXPATHMessage(
               XPATHErrorResources.ER_ARG_LOCALNAME_NULL, null)); //"Argument 
'localName' is null");
   
  +    if (validate) 
  +    {
  +        if (!XMLChar.isValidNCName(localName))
  +        {
  +            throw new 
IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_LOCALNAME_INVALID,null )); 
//"Argument 'localName' not a valid NCName");
  +        }
  +    }
  +    
       _namespaceURI = namespaceURI;
       _localName = localName;
       m_hashCode = calcHashCode();
  @@ -145,11 +170,43 @@
      */
     public QName(String namespaceURI, String prefix, String localName)
     {
  +     this(namespaceURI, prefix, localName, false);
  +  }
  +  
  + /**
  +   * Constructs a new QName with the specified namespace URI, prefix
  +   * and local name.
  +   *
  +   * @param namespaceURI The namespace URI if known, or null
  +   * @param prefix The namespace prefix is known, or null
  +   * @param localName The local name
  +   * @param validate If true the new QName will be validated and an 
IllegalArgumentException will
  +   *                 be thrown if it is invalid.
  +   */
  +  public QName(String namespaceURI, String prefix, String localName, boolean 
validate)
  +  {
   
  +    // This check was already here.  So, for now, I will not add it to the 
validation
  +    // that is done when the validate parameter is true.
       if (localName == null)
         throw new IllegalArgumentException(XSLMessages.createXPATHMessage(
               XPATHErrorResources.ER_ARG_LOCALNAME_NULL, null)); //"Argument 
'localName' is null");
   
  +    if (validate)
  +    {    
  +        if (!XMLChar.isValidNCName(localName))
  +        {
  +            throw new 
IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_LOCALNAME_INVALID,null )); 
//"Argument 'localName' not a valid NCName");
  +        }
  +
  +        if ((null != prefix) && (!XMLChar.isValidNCName(prefix)))
  +        {
  +            throw new 
IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_PREFIX_INVALID,null )); //"Argument 
'prefix' not a valid NCName");
  +        }
  +
  +    }
       _namespaceURI = namespaceURI;
       _prefix = prefix;
       _localName = localName;
  @@ -164,11 +221,34 @@
      */
     public QName(String localName)
     {
  +    this(localName, false);
  +  }
  +  
  +  /**
  +   * Construct a QName from a string, without namespace resolution.  Good
  +   * for a few odd cases.
  +   *
  +   * @param localName Local part of qualified name
  +   * @param validate If true the new QName will be validated and an 
IllegalArgumentException will
  +   *                 be thrown if it is invalid.
  +   */
  +  public QName(String localName, boolean validate)
  +  {
   
  +    // This check was already here.  So, for now, I will not add it to the 
validation
  +    // that is done when the validate parameter is true.
       if (localName == null)
         throw new IllegalArgumentException(XSLMessages.createXPATHMessage(
               XPATHErrorResources.ER_ARG_LOCALNAME_NULL, null)); //"Argument 
'localName' is null");
   
  +    if (validate)
  +    {    
  +        if (!XMLChar.isValidNCName(localName))
  +        {
  +            throw new 
IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_LOCALNAME_INVALID,null )); 
//"Argument 'localName' not a valid NCName");
  +        }
  +    }
       _namespaceURI = null;
       _localName = localName;
       m_hashCode = calcHashCode();
  @@ -184,6 +264,21 @@
      */
     public QName(String qname, Stack namespaces)
     {
  +    this(qname, namespaces, false);
  +  }
  +
  +  /**
  +   * Construct a QName from a string, resolving the prefix
  +   * using the given namespace stack. The default namespace is
  +   * not resolved.
  +   *
  +   * @param qname Qualified name to resolve
  +   * @param namespaces Namespace stack to use to resolve namespace
  +   * @param validate If true the new QName will be validated and an 
IllegalArgumentException will
  +   *                 be thrown if it is invalid.
  +   */
  +  public QName(String qname, Stack namespaces, boolean validate)
  +  {
   
       String namespace = null;
       String prefix = null;
  @@ -235,6 +330,14 @@
   
       _localName = (indexOfNSSep < 0)
                    ? qname : qname.substring(indexOfNSSep + 1);
  +    if (validate)
  +    {
  +        if ((_localName == null) || (!XMLChar.isValidNCName(_localName))) 
  +        {
  +           throw new IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_LOCALNAME_INVALID,null )); 
//"Argument 'localName' not a valid NCName");
  +        }
  +    }                 
       _namespaceURI = namespace;
       _prefix = prefix;
       m_hashCode = calcHashCode();
  @@ -252,6 +355,23 @@
     public QName(String qname, Element namespaceContext,
                  PrefixResolver resolver)
     {
  +      this(qname, namespaceContext, resolver, false);
  +  }
  +
  +  /**
  +   * Construct a QName from a string, resolving the prefix
  +   * using the given namespace context and prefix resolver. 
  +   * The default namespace is not resolved.
  +   * 
  +   * @param qname Qualified name to resolve
  +   * @param namespaceContext Namespace Context to use
  +   * @param resolver Prefix resolver for this context
  +   * @param validate If true the new QName will be validated and an 
IllegalArgumentException will
  +   *                 be thrown if it is invalid.
  +   */
  +  public QName(String qname, Element namespaceContext,
  +               PrefixResolver resolver, boolean validate)
  +  {
   
       _namespaceURI = null;
   
  @@ -293,7 +413,16 @@
       _localName = (indexOfNSSep < 0)
                    ? qname : qname.substring(indexOfNSSep + 1);
       m_hashCode = calcHashCode();
  -  }
  +    if (validate)
  +    {
  +        if ((_localName == null) || (!XMLChar.isValidNCName(_localName))) 
  +        {
  +           throw new IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_LOCALNAME_INVALID,null )); 
//"Argument 'localName' not a valid NCName");
  +        }
  +    }                 
  +    }                 
  +                 
   
     /**
      * Construct a QName from a string, resolving the prefix
  @@ -305,6 +434,21 @@
      */
     public QName(String qname, PrefixResolver resolver)
     {
  +    this(qname, resolver, false);
  +  }
  +
  +  /**
  +   * Construct a QName from a string, resolving the prefix
  +   * using the given namespace stack. The default namespace is
  +   * not resolved.
  +   *
  +   * @param qname Qualified name to resolve
  +   * @param resolver Prefix resolver for this context
  +   * @param validate If true the new QName will be validated and an 
IllegalArgumentException will
  +   *                 be thrown if it is invalid.
  +   */
  +  public QName(String qname, PrefixResolver resolver, boolean validate)
  +  {
   
       _namespaceURI = null;
   
  @@ -339,6 +483,16 @@
       _localName = (indexOfNSSep < 0)
                    ? qname : qname.substring(indexOfNSSep + 1);
       m_hashCode = calcHashCode();
  +    if (validate)
  +    {
  +        if ((_localName == null) || (!XMLChar.isValidNCName(_localName))) 
  +        {
  +           throw new IllegalArgumentException(XSLMessages.createXPATHMessage(
  +            XPATHErrorResources.ER_ARG_LOCALNAME_INVALID,null )); 
//"Argument 'localName' not a valid NCName");
  +        }
  +    }                 
  +
  +              
     }
   
     /**
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.6.1   +1 -1      xml-xalan/java/src/org/apache/xml/utils/XMLChar.java
  
  Index: XMLChar.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/XMLChar.java,v
  retrieving revision 1.1
  retrieving revision 1.1.6.1
  diff -u -r1.1 -r1.1.6.1
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.30.4.1  +2 -2      
xml-xalan/java/src/org/apache/xalan/res/XSLTInfo.properties
  
  Index: XSLTInfo.properties
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLTInfo.properties,v
  retrieving revision 1.30
  retrieving revision 1.30.4.1
  diff -u -r1.30 -r1.30.4.1
  --- XSLTInfo.properties       13 Jun 2002 15:32:24 -0000      1.30
  +++ XSLTInfo.properties       6 Dec 2002 18:14:53 -0000       1.30.4.1
  @@ -2,7 +2,7 @@
   #  XSLT Resource File
   #
   
  -version=2.4.D1
  +version=2.4.1
   vendor=Apache Software Foundation
   vendor-url=http://xml.apache.org/xalan-j
   
  @@ -11,4 +11,4 @@
   # but simply reads the system properties, Xalan tries to load 
   # this value into the system properties.
   org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
  -# org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl
  \ No newline at end of file
  +# org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl
  
  
  
  1.29.2.1.2.1 +96 -2     
xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java
  
  Index: XSLTErrorResources.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java,v
  retrieving revision 1.29.2.1
  retrieving revision 1.29.2.1.2.1
  diff -u -r1.29.2.1 -r1.29.2.1.2.1
  --- XSLTErrorResources.java   14 Aug 2002 19:21:27 -0000      1.29.2.1
  +++ XSLTErrorResources.java   6 Dec 2002 18:14:53 -0000       1.29.2.1.2.1
  @@ -934,8 +934,9 @@
     public static final int ER_FAILED_CREATING_ELEMLITRSLT = 203;
   
     
  -   /** Priority value does not contain a parsable number   */
  -  public static final int ER_PRIORITY_NOT_PARSABLE = 204;
  +   /** Value for {0} should contain a parsable number   */
  +  public static final int ER_VALUE_SHOULD_BE_NUMBER = 204;
  +
   
     
      /**  Value for {0} should equal 'yes' or 'no'   */
  @@ -1016,6 +1017,61 @@
   // ListingErrorHandler created with null PrintWriter!
     public static final int ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = 
236;
   
  +  // {0}is not allowed in this position in the stylesheet!
  +  public static final int ER_NOT_ALLOWED_IN_POSITION = 237;
  +
  +  // Non-whitespace text is not allowed in this position in the stylesheet!
  +  public static final int ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = 238;
  +  
  +  // This code is shared with warning codes.
  +  // Illegal value: {1} used for CHAR attribute: {0}.  An attribute of type 
CHAR must be only 1 character!
  +  public static final int INVALID_TCHAR = 239;
  +  
  +  // SystemId Unknown
  +  public static final int ER_SYSTEMID_UNKNOWN = 240;
  +    
  +  // Location of error unknown  
  +  public static final int ER_LOCATION_UNKNOWN = 241;
  +  
  +  //The following codes are shared with the warning codes... 
  +  // Illegal value: {1} used for QNAME attribute: {0}
  +  public static final int INVALID_QNAME = 242;   
  +   
  +  // Illegal value\u003a {1} used for ENUM attribute\u003a {0}.  Valid 
values are\u003a {2}.
  +  public static final int INVALID_ENUM = 243;
  +   
  +  // Illegal value\u003a {1} used for NMTOKEN attribute\u003a {0}. 
  +  public static final int INVALID_NMTOKEN = 244;
  +      
  +  // Illegal value\u003a {1} used for NCNAME attribute\u003a {0}. 
  +  public static final int INVALID_NCNAME = 245;  
  +   
  +  // Illegal value\u003a {1} used for boolean attribute\u003a {0}. 
  +  public static final int INVALID_BOOLEAN = 246;  
  +
  +  // Illegal value\u003a {1} used for number attribute\u003a {0}. 
  +  public static final int INVALID_NUMBER = 247;
  +
  +  
  +  // End of shared codes...
  +  
  +  // Argument to {0} in match pattern must be a literal.
  +  public static final int ER_ARG_LITERAL             = 248;
  +  
  +  // Duplicate global variable declaration.
  +  public static final int ER_DUPLICATE_GLOBAL_VAR    = 249;
  +  
  +  // Duplicate variable declaration.
  +  public static final int ER_DUPLICATE_VAR           = 250;
  +  
  +  // xsl:template must have a name or match attribute (or both)
  +  public static final int ER_TEMPLATE_NAME_MATCH     = 251;    
  +  
  +  // Prefix in exclude-result-prefixes is not valid\u003a {0}
  +  public static final int ER_INVALID_PREFIX          = 252;
  +  
  +  // attribute-set named {0} does not exist
  +  public static final int ER_NO_ATTRIB_SET           = 253;
     /*
       /**  Cannot find SAX1 driver class    *
     public static final int ER_CANNOT_FIND_SAX1_DRIVER = 190;
  @@ -1166,6 +1222,44 @@
     /** WG_EMPTY_SECOND_ARG          */
     public static final int WG_EMPTY_SECOND_ARG = 26;
   
  +  /** WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML          */
  +  public static final int WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = 27;
  +  
  +  /** WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME          */
  +  public static final int WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = 28;  
  +  
  +  /** WG_ILLEGAL_ATTRIBUTE_POSITION         */
  +  public static final int WG_ILLEGAL_ATTRIBUTE_POSITION = 29;
  +  
  +  
  +  //The following warning codes are shared with the error codes ... 
  +  // Illegal value: {1} used for CHAR attribute: {0}.  An attribute of type 
CHAR must be only 1 character!
  +  public static final int WG_INVALID_TCHAR = 239;
  +  
  +  
  +  // Illegal value: {1} used for QNAME attribute: {0}
  +  public static final int WG_INVALID_QNAME = 242;
  +  
  +   
  +  // Illegal value\u003a {1} used for ENUM attribute\u003a {0}.  Valid 
values are\u003a {2}.
  +  public static final int WG_INVALID_ENUM = 243;
  +  
  +   
  +  // Illegal value\u003a {1} used for NMTOKEN attribute\u003a {0}. 
  +  public static final int WG_INVALID_NMTOKEN = 244;
  +  
  +      
  +  // Illegal value\u003a {1} used for NCNAME attribute\u003a {0}. 
  +  public static final int WG_INVALID_NCNAME = 245;
  +  
  +   
  +  // Illegal value\u003a {1} used for boolean attribute\u003a {0}. 
  +  public static final int WG_INVALID_BOOLEAN = 246;
  +  
  +
  +  // Illegal value\u003a {1} used for number attribute\u003a {0}. 
  +  public static final int WG_INVALID_NUMBER = 247;
  +  // End of codes that are shared...
   
     // Other miscellaneous text used inside the code...
   
  
  
  
  1.9.2.1.2.1 +228 -8    
xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.properties
  
  Index: XSLTErrorResources.properties
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.properties,v
  retrieving revision 1.9.2.1
  retrieving revision 1.9.2.1.2.1
  diff -u -r1.9.2.1 -r1.9.2.1.2.1
  --- XSLTErrorResources.properties     14 Aug 2002 19:21:27 -0000      1.9.2.1
  +++ XSLTErrorResources.properties     6 Dec 2002 18:14:53 -0000       
1.9.2.1.2.1
  @@ -1,8 +1,41 @@
   # This file contains error and warning messages related to Xalan Error 
Handling.
  -# Many of the messages are referenced by integer value (to avoid more 
strings in the 
  -# class files) and the string keys formed at runtime.  In the case where the 
key is an 
  -# integer, the constant reference (that would be used in the code) is listed 
in a comment 
  -# above the tuple.
  +# Many of the messages are referenced by integer value (to avoid more strings
  +# in the class files) and the string keys formed at runtime.  In the case 
where
  +# the key is an integer, the constant reference (that would be used in the 
code)
  +# is listed in a comment above the tuple.
  +#
  +#  General notes to translators:
  +#
  +#  1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of
  +#     components.
  +#     XSLT is an acronym for "XML Stylesheet Language: Transformations".
  +#     XSLTC is an acronym for XSLT Compiler.
  +#
  +#  2) A stylesheet is a description of how to transform an input XML document
  +#     into a resultant XML document (or HTML document or text).  The
  +#     stylesheet itself is described in the form of an XML document.
  +#
  +#  3) A template is a component of a stylesheet that is used to match a
  +#     particular portion of an input document and specifies the form of the
  +#     corresponding portion of the output document.
  +#
  +#  4) An element is a mark-up tag in an XML document; an attribute is a
  +#     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
  +#     "elem" is an element name, "attr" and "attr2" are attribute names with
  +#     the values "val" and "val2", respectively.
  +#
  +#  5) A namespace declaration is a special attribute that is used to 
associate
  +#     a prefix with a URI (the namespace).  The meanings of element names and
  +#     attribute names that use that prefix are defined with respect to that
  +#     namespace.
  +#
  +#  6) "Translet" is an invented term that describes the class file that
  +#     results from compiling an XML stylesheet into a Java class.
  +#
  +#  7) XPath is a specification that describes a notation for identifying
  +#     nodes in a tree-structured representation of an XML document.  An
  +#     instance of that notation is referred to as an XPath expression.
  +#
   
   # ER_ROR0000
   ER0000={0}
  @@ -175,7 +208,7 @@
   # ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER
   ER0084=Can't resolve prefix of non-Prefix resolver!
   # ER_REDIRECT_COULDNT_GET_FILENAME
  -ER0085=Redirect extension\u003a Could not get filename - file or select 
attribute must return vald string.
  +ER0085=Redirect extension\u003a Could not get filename - file or select 
attribute must return valid string.
   # ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT
   ER0086=Can not build FormatterListener in Redirect extension!
   # ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX
  @@ -412,8 +445,8 @@
   ER0202=Cannot initialize URI with empty parameters
   # ER_FAILED_CREATING_ELEMLITRSLT
   ER0203=Failed creating ElemLiteralResult instance
  -# ER_PRIORITY_NOT_PARSABLE
  -ER0204=Priority value does not contain a parsable number
  +# ER_VALUE_SHOULD_BE_NUMBER
  +ER0204=Value for {0} should contain a parsable number
   # ER_VALUE_SHOULD_EQUAL
   ER0205= Value for {0} should equal yes or no
   # ER_FAILED_CALLING_METHOD
  @@ -480,6 +513,96 @@
   ER0235=Axis traverser not supported: {0}
   # ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER!
   ER0236=ListingErrorHandler created with null PrintWriter!
  +# ER_NOT_ALLOWED_IN_POSITION
  +ER0237={0} is not allowed in this position in the stylesheet!
  +# ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION
  +ER0238=Non-whitespace text is not allowed in this position in the stylesheet!
  +# INVALID_TCHAR
  +ER0239=Illegal value: {1} used for CHAR attribute: {0}.  An attribute of 
type CHAR must be only 1 character!
  +# ER_SYSTEMID_UNKNOWN
  +ER0240=SystemId Unknown
  +# ER_LOCATION_UNKNOWN
  +ER0241=Location of error unknown
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "QNAME" is the XML data-type of
  +# the attribute, and should not be translated.  The substitution text {1} is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_QNAME      
  +ER0242=Illegal value\u003a {1} used for QNAME attribute\u003a {0}
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "ENUM" is the XML data-type of
  +# the attribute, and should not be translated.  The substitution text {1} is
  +# the attribute value, {0} is the attribute name, and {2} is a list of valid
  +# values.
  +# INVALID_ENUM
  +ER0243=Illegal value\u003a {1} used for ENUM attribute\u003a {0}.  Valid 
values are\u003a {2}.
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "NMTOKEN" is the XML data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_NMTOKEN
  +ER0244=Illegal value\u003a {1} used for NMTOKEN attribute\u003a {0} 
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "NCNAME" is the XML data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_NCNAME
  +ER0245=Illegal value\u003a {1} used for NCNAME attribute\u003a {0} 
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "boolean" is the XSLT data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_BOOLEAN 
  +ER0246=Illegal value\u003a {1} used for boolean attribute\u003a {0} 
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "number" is the XSLT data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_NUMBER 
  +ER0247=Illegal value\u003a {1} used for number attribute\u003a {0} 
  +
  +# Note to translators:  A "match pattern" is a special form of XPath 
expression
  +# that is used for matching patterns.  The substitution text is the name of
  +# a function.  The message indicates that when this function is referenced in
  +# a match pattern, its argument must be a string literal (or constant.)
  +# ER_ARG_LITERAL - new error message for bugzilla #5202
  +ER0248=Argument to {0} in match pattern must be a literal.
  +
  +# Note to translators:  The following message indicates that two definitions 
of
  +# a variable.  A "global variable" is a variable that is accessible everywher
  +# in the stylesheet.
  +# ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790
  +ER0249=Duplicate global variable declaration.
  +
  +# Note to translators:  The following message indicates that two definitions 
of
  +# a variable were encountered.
  +# ER_DUPLICATE_VAR - new error message for bugzilla #790
  +ER0250=Duplicate variable declaration.
  +
  +# Note to translators:  "xsl:template", "name" and "match" are XSLT keywords
  +# which must not be translated.
  +# ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789
  +ER0251=xsl\u003atemplate must have a name or match attribute (or both)
  +
  +# Note to translators:  "exclude-result-prefixes" is an XSLT keyword which
  +# should not be translated.  The message indicates that a namespace prefix
  +# encountered as part of the value of the exclude-result-prefixes attribute
  +# was in error.
  +# ER_INVALID_PREFIX - new error message for bugzilla #788
  +ER0252=Prefix in exclude-result-prefixes is not valid\u003a {0}
  +
  +# Note to translators:  An "attribute set" is a set of attributes that can be
  +# added to an element in the output document as a group.  The message 
indicates
  +# that there was a reference to an attribute set named {0} that was never
  +# defined.
  +# ER_NO_ATTRIB_SET - new error message for bugzilla #782
  +ER0253=attribute-set named {0} does not exist
   
   # WG_FOUND_CURLYBRACE 
   WR0001=Found '}' but no attribute template open!
  @@ -533,6 +656,76 @@
   WR0025=Illegal value used for attribute {0}\u003a {1}
   # WG_EMPTY_SECOND_ARG 
   WR0026=Resulting nodeset from second argument of document function is empty. 
The first agument will be used.
  +
  +# Note to translators:  "name" and "xsl:processing-instruction" are keywords
  +# and must not be translated.
  +# WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML
  +WR0027=The value of the 'name' attribute of xsl\u003aprocessing-instruction \
  +name must not be 'xml'
  +
  +# Note to translators:  "name" and "xsl:processing-instruction" are keywords
  +# and must not be translated.  "NCName" is an XML data-type and must not be
  +# translated.
  +# WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME
  +WR0028=The value of the 'name' attribute of xsl\u003aprocessing-instruction \
  +must be a valid NCName\u003a {0}
  +
  +# Note to translators:  This message is reported if the stylesheet that is
  +# being processed attempted to construct an XML document with an attribute 
in a
  +# place other than on an element.  The substitution text specifies the name 
of
  +# the attribute.
  +# WG_ILLEGAL_ATTRIBUTE_POSITION 
  +WR0029=Cannot add attribute {0} after child nodes or before an element is 
produced.  Attribute will be ignored.
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "CHAR" is the XSLT data-type of
  +# the attribute, and should not be translated.  The substitution text {1} is
  +# invalid value, and {0} is the attribute name.
  +# INVALID_TCHAR
  +WR0239=Illegal value: {1} used for CHAR attribute\u003a  {0}.  An attribute 
of type CHAR must be only 1 character!
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "QNAME" is the XML data-type of
  +# the attribute, and should not be translated.  The substitution text {1} is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_QNAME      
  +WR0242=Illegal value\u003a {1} used for QNAME attribute\u003a {0}
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "ENUM" is the XML data-type of
  +# the attribute, and should not be translated.  The substitution text {1} is
  +# the attribute value, {0} is the attribute name, and {2} is a list of valid
  +# values.
  +# INVALID_ENUM
  +WR0243=Illegal value\u003a {1} used for ENUM attribute\u003a {0}.  Valid 
values are\u003a {2}.
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "NMTOKEN" is the XML data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_NMTOKEN
  +WR0244=Illegal value\u003a {1} used for NMTOKEN attribute\u003a {0} 
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "NCNAME" is the XML data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_NCNAME
  +WR0245=Illegal value\u003a {1} used for NCNAME attribute\u003a {0} 
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "boolean" is the XSLT data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_BOOLEAN
  +WR0246=Illegal value\u003a {1} used for boolean attribute\u003a {0} 
  +
  +# Note to translators:  The following message is used if the value of
  +# an attribute in a stylesheet is invalid.  "number" is the XSLT data-type
  +# of the attribute, and should not be translated.  The substitution text {1} 
is
  +# the attribute value and {0} is the attribute name.
  +# INVALID_NUMBER
  +WR0247=Illegal value\u003a {1} used for number attribute\u003a {0} 
   ui_language=en
   help_language=en
   language=en
  @@ -544,8 +737,23 @@
   line=Line \u0023
   column=Column \u0023
   xsldone=XSLProcessor\u003a done
  +# Note to translators:  The following messages provide usage information
  +# for the Xalan Process command line.  "Process" is the name of a Java class,
  +# and should not be translated.
   xslProc_option=Xalan-J command line Process class options\u003a
  -optionIN=    -IN inputXMLURL
  +xslProc_invalid_xsltc_option=The option {0} is not supported in XSLTC mode.
  +xslProc_invalid_xalan_option=The option {0} can only be used with -XSLTC.
  +xslProc_no_input=Error: No stylesheet or input xml is specified. Run this 
command without any option for usage instructions.
  +xslProc_common_options=-Common Options-
  +xslProc_xalan_options=-Options for Xalan-
  +xslProc_xsltc_options=-Options for XSLTC-
  +xslProc_return_to_continue=(press <return> to continue)
  +
  +# Note to translators: The option name and the parameter name do not need to 
be
  +# translated. Only translate the messages in parentheses.
  +# Do not translate the keywords: XSLTC, SAX, DOM and DTM.
  +optionXSLTC=    [-XSLTC (use XSLTC for transformation)]
  +optionIN=    [-IN inputXMLURL]
   optionXSL=   [-XSL XSLTransformationURL]
   optionOUT=   [-OUT outputFileName]
   optionLXCIN=   [-LXCIN compiledStylesheetFileNameIn]
  @@ -576,6 +784,18 @@
   optionINCREMENTAL=   [-INCREMENTAL (request incremental DTM construction by 
setting http://xml.apache.org/xalan/features/incremental true.)]");
   optionNOOPTIMIMIZE=   [-NOOPTIMIMIZE (request no stylesheet optimization 
proccessing by setting http://xml.apache.org/xalan/features/optimize false.)]");
   optionRL=   [-RL recursionlimit (assert numeric limit on stylesheet 
recursion depth.)]");
  +optionXO=   [-XO [transletName] (assign the name to the generated translet)]
  +optionXD=   [-XD destinationDirectory (specify a destination directory for 
translet)]
  +optionXJ=   [-XJ jarfile (packages translet classes into a jar file of name 
<jarfile>)]
  +optionXP=   [-XP package (specifies a package name prefix for all generated 
translet classes)]
  +
  +# Note to translators:  The following message describes usage of a particular
  +# command-line option that is used to enable the "template inlining"
  +# optimization.  The optimization involves making a copy of the code 
generated
  +# for a template in another template that refers to it.
  +optionXN=   [-XN (enables template inlining)]
  +optionXX=   [-XX (turns on additional debugging message output)]
  +optionXT=   [-XT (use translet to transform if possible)]
   noParsermsg1=XSL Process was not successful.
   noParsermsg2=** Could not find parser **
   noParsermsg3=Please check your classpath.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to