You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2002/11/08 21:09:10 UTC

cvs commit: xml-xerces/java/samples/xni PSVIWriter.java

sandygao    2002/11/08 12:09:10

  Modified:    java/samples/xni PSVIWriter.java
  Log:
  Need to output character information, as part of the base infoset.
  
  Revision  Changes    Path
  1.14      +15 -2     xml-xerces/java/samples/xni/PSVIWriter.java
  
  Index: PSVIWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/PSVIWriter.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PSVIWriter.java	25 Oct 2002 16:57:15 -0000	1.13
  +++ PSVIWriter.java	8 Nov 2002 20:09:10 -0000	1.14
  @@ -654,6 +654,20 @@
        */
       public void characters(XMLString text, Augmentations augs)
       throws XNIException {
  +        if (fPSVInfoset) {
  +            checkForChildren();
  +            // REVISIT: 2.6. Character Information Items requires character property for   
  +            //          each character. However, it also says:   
  +            // "Each character is a logically separate information item,   
  +            //  but XML applications are free to chunk characters into larger   
  +            //  groups as necessary or desirable"   
  +            //  XSV outputs each character separately.   
  +            printIndentTag("<character>");
  +            printElement("characterCode", text.toString());
  +            printElement("elementContentWhitespace", "false");
  +            printUnIndentTag("</character>");
  +
  +        }
           if (fDocumentHandler != null) {
               fDocumentHandler.characters(text,augs);
           }
  @@ -675,7 +689,6 @@
       public void ignorableWhitespace(XMLString text, Augmentations augs)
       throws XNIException {
           if (fPSVInfoset && fIncludeIgnorableWhitespace) {
  -            int textLength = text.length;
               checkForChildren();
               // REVISIT: see characters()
               printIndentTag("<character>");
  
  
  

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