You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@apache.org on 2001/08/01 10:06:30 UTC

cvs commit: xml-xerces/java/docs/style/stylesheets document2html.xsl releases2document.xsl

andyc       01/08/01 01:06:30

  Modified:    java/docs Tag: xerces_j_2 docs-book.xml xni-config.xml
                        xni-core.xml
               java/docs/style/stylesheets Tag: xerces_j_2
                        document2html.xsl releases2document.xsl
  Log:
  Update samples documentation. Fixed releases page creation bug.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.8   +2 -2      xml-xerces/java/docs/docs-book.xml
  
  Index: docs-book.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/docs-book.xml,v
  retrieving revision 1.5.2.7
  retrieving revision 1.5.2.8
  diff -u -r1.5.2.7 -r1.5.2.8
  --- docs-book.xml	2001/07/31 09:56:31	1.5.2.7
  +++ docs-book.xml	2001/08/01 08:06:29	1.5.2.8
  @@ -20,11 +20,11 @@
    <hidden title='User Interface Samples'
            id='samples-ui' source='samples-ui.xml'/>
    <hidden title='XNI Samples' id='samples-xni' source='samples-xni.xml'/>
  - <!--
    <document label='API JavaDoc' title='API JavaDoc'
              id='api' source='api.xml'/>
  - -->
  + <!--
    <external label='API JavaDoc' href='apiDocs/index.html'/>
  + -->
    <document label='XNI Manual' title='Xerces Native Interface'
              id='xni' source='xni.xml'/>
    <hidden title='XNI Design Details' 
  
  
  
  1.1.2.4   +45 -5     xml-xerces/java/docs/Attic/xni-config.xml
  
  Index: xni-config.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/Attic/xni-config.xml,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- xni-config.xml	2001/07/31 09:56:31	1.1.2.3
  +++ xni-config.xml	2001/08/01 08:06:29	1.1.2.4
  @@ -22,13 +22,16 @@
      <li><link anchor='abstract-parser-config'>Abstract Parser Configuration</link></li>
      <li><link anchor='csv-parser-config'>CSV Parser Configuration</link></li>
     </ul>
  -  <p>
  -   <strong>Note:</strong>
  +  <note>
      All of the interfaces and classes defined in this document
      reside in the <code>org.apache.xerces.xni.parser</code> package
      but may use various interfaces and classes from the core XNI
      package, <code>org.apache.xerces.xni</code>.
  -  </p>
  +  </note>
  +  <note>
  +   The source code for the samples in this document are included
  +   in the downloaded packages for Xerces2.
  +  </note>
    </s2>
    <anchor name='components'/>
    <s2 title='Components'>
  @@ -629,6 +632,7 @@
               short type = XMLConfigurationException.NOT_RECOGNIZED;
               throw new XMLConfigurationException(type, featureId);
           }
  +        fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE);
           int length = fComponents.size();
           for (int i = 0; i < length; i++) {
               XMLComponent component = (XMLComponent)fComponents.elementAt(i);
  @@ -662,6 +666,12 @@
               short type = XMLConfigurationException.NOT_RECOGNIZED;
               throw new XMLConfigurationException(type, propertyId);
           }
  +        if (value != null) {
  +            fProperties.put(propertyId, value);
  +        }
  +        else {
  +            fProperties.remove(propertyId);
  +        }
           int length = fComponents.size();
           for (int i = 0; i < length; i++) {
               XMLComponent component = (XMLComponent)fComponents.elementAt(i);
  @@ -750,13 +760,13 @@
     <s3 title='CSV Parser Configuration'>
      <p>
       This example is a very simple parser configuration that can
  -    parser files with comma-separated values (CSV) to generate
  +    parse files with comma-separated values (CSV) to generate
       XML events. For example, the following CSV document:
      </p>
      <source>Andy Clark,16 Jan 1973,Cincinnati</source>
      <p>
       produces the following XML "document" as represented by the
  -    the XNI streaming document information:
  +    XNI streaming document information:
      </p>
      <source><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
   <!DOCTYPE csv [
  @@ -901,6 +911,36 @@
       }
       
   } // class CSVConfiguration]]></source>
  +  <p>
  +   The source code is longer than it actually needs to be because
  +   it also emits the DTD information necessary for a validating
  +   parser to validate the document. The real core of the example
  +   is the following:
  +  </p>
  +  <source><![CDATA[fDocumentHandler.startDocument(null, "UTF-8");
  +fDocumentHandler.startElement(CSV, EMPTY_ATTRS);
  +
  +String line;
  +while ((line = bufferedReader.readLine()) != null) {
  +    if (fDocumentHandler != null) {
  +        fDocumentHandler.startElement(ROW, EMPTY_ATTRS);
  +        
  +	StringTokenizer tokenizer = new StringTokenizer(line, ",");
  +        while (tokenizer.hasMoreTokens()) {
  +            fDocumentHandler.startElement(COL, EMPTY_ATTRS);
  +            String token = tokenizer.nextToken();
  +            fStringBuffer.clear();
  +            fStringBuffer.append(token);
  +            fDocumentHandler.characters(fStringBuffer);
  +            fDocumentHandler.endElement(COL);
  +        }
  +	
  +        fDocumentHandler.endElement(ROW);
  +    }
  +}
  +
  +fDocumentHandler.endElement(CSV);
  +fDocumentHandler.endDocument();]]></source>
     </s3>
    </s2>
   </s1>
  
  
  
  1.1.2.2   +6 -3      xml-xerces/java/docs/Attic/xni-core.xml
  
  Index: xni-core.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/Attic/xni-core.xml,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- xni-core.xml	2001/07/31 09:56:31	1.1.2.1
  +++ xni-core.xml	2001/08/01 08:06:29	1.1.2.2
  @@ -29,6 +29,10 @@
      refer to the <link idref='xni-config'>Parser Configuration</link>
      documentation.
     </p>
  +  <note>
  +   The source code for the samples in this document are included
  +   in the downloaded packages for Xerces2.
  +  </note>
    </s2>
    <s2 title='Document Information'>
     <p>
  @@ -41,12 +45,11 @@
      Interface. However, XNI does not depend on the SAX interfaces
      and classes.
     </p>
  -  <p>
  -   <strong>Note:</strong>
  +  <note>
      All of the interfaces and classes documented on this page
      are contained within the <code>org.apache.xerces.xni</code>
      package.
  -  </p>
  +  </note>
     <anchor name='document-handler'/>
     <s3 title='Interface XMLDocumentHandler'>
      <p>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +12 -0     xml-xerces/java/docs/style/stylesheets/Attic/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/style/stylesheets/Attic/document2html.xsl,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- document2html.xsl	2001/07/25 08:43:37	1.1.2.2
  +++ document2html.xsl	2001/08/01 08:06:29	1.1.2.3
  @@ -413,6 +413,16 @@
     </xsl:template>
   
     <xsl:template match="img">
  +   <xsl:choose>
  +   <xsl:when test='starts-with(@src,"sbk:/resources/")'>
  +    <img src='resources/{substring-after(@src,"sbk:/resources/")}' 
  +         border="0" vspace="4" hspace="4">
  +     <xsl:if test='@alt'>
  +      <xsl:attribute name='alt'><xsl:value-of select='@alt'/></xsl:attribute>
  +     </xsl:if>
  +    </img>
  +   </xsl:when>
  +   <xsl:otherwise>
       <img src="images/{@src}" border="0" vspace="4" hspace="4">
        <xsl:if test='@alt'>
         <xsl:attribute name='alt'><xsl:value-of select='@alt'/></xsl:attribute>
  @@ -420,6 +430,8 @@
       </img>
       <!--<img src="images/{@src}" border="0" vspace="4" hspace="4" align="right"/>-->
       <!--<img src="{@src}" border="0"/>-->
  +   </xsl:otherwise>
  +   </xsl:choose>
     </xsl:template>
   
     <xsl:template match="resource-ref">
  
  
  
  1.1.2.2   +1 -1      xml-xerces/java/docs/style/stylesheets/Attic/releases2document.xsl
  
  Index: releases2document.xsl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/style/stylesheets/Attic/releases2document.xsl,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- releases2document.xsl	2001/07/19 06:34:13	1.1.2.1
  +++ releases2document.xsl	2001/08/01 08:06:30	1.1.2.2
  @@ -39,7 +39,7 @@
    <xsl:template match='add|remove|fix|update'>
     <xsl:variable name='name'><xsl:value-of select='name()'/></xsl:variable>
     <li>
  -   <img alt='{$name}' src='resources/changes-{$name}.jpg' border='0'/>
  +   <img alt='{$name}' src='sbk:/resources/changes-{$name}.jpg' border='0'/>
      <xsl:copy-of select='note/*|note/text()'/>
      <xsl:if test='submitter'>
       <xsl:apply-templates select='submitter'/>
  
  
  

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