You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ne...@ca.ibm.com on 2001/03/17 00:36:14 UTC

Xerces-J 1.3.1 now available

Hi folks,

This is to let you all know that Xerces-J 1.3.1 is now available.  Chief
among the new features and significant bugfixes in this new release are:

- Added support for schema <redefine> element
- Added support for schema notations
- Implemented validation constraints for the "abstract" attribute on
elements
- Simple value normalization and whitespace facet support
- Fixed validation constraints surrounding the schema <annotation> element
info item
- Implemented support for JAXP 1.1
- Added experimental DOM Level 3 features for handling XML header
- Partially fixed inability to make (or build) Xerces-J under Unix
- Changed parse method to close streams opened by parser even in event of
error

Enjoy!
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  416-448-3519, T/L 778-3519
E-mail:  neilg@ca.ibm.com



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


document fragment serialization

Posted by se...@cern.ch.
I'm trying to serialize a document fragment using the XmlSerializer and there
is a little bug (or feature ?) there :
  the comments before the first element of the fragment are not serialized.
After some investigation, it's because serializePreRoot is not called while
serializing a document fragment.

Is it not a bug ?

Sebastien


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


Re: Xerces-J 1.3.1 now available

Posted by se...@cern.ch.
There is still this error concerning serialization of comments : no cariage
return is put before or after comments which result in serializing all file
on a single line if you put comments every two lines.
I sent a patch for that that wasn't applied. Could someone check it please ?

Sebastien

Here is the patch :

Index: BaseMarkupSerializer.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java,v

retrieving revision 1.21
diff -r1.21 BaseMarkupSerializer.java
361a362
>         state.afterComment = false;
601c602,607
<             _printer.indent();
---
>             // Indent this element on a new line if the first
>             // content of the parent element or immediately
>             // following an element.
>             if ( _indenting && ! state.preserveSpace)
>                 _printer.breakLine();
>       _printer.indent();
603c609
<             _printer.unindent();
---
>       _printer.unindent();
604a611,612
>     state.afterComment = true;
>     state.afterElement = false;
886c894,895
<                 characters( node.getNodeValue() );
---
>         if ( !_indenting || getElementState().preserveSpace ||
!(text.replace('\n',' ').trim() != ""))
>           characters( node.getNodeValue() );
1036a1046,1049
>             // Except for one content type, all of them
>             // are not last comment. That one content
>             // type will take care of itself.
>             state.afterComment = false;
1368a1382
>         state.afterComment = false;
Index: ElementState.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xml/serialize/ElementState.java,v

retrieving revision 1.6
diff -r1.6 ElementState.java
114a115,120
>      * True if the last serialized node was a comment node.
>      */
>     boolean afterComment;
>
>
>     /**
Index: XMLSerializer.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java,v

retrieving revision 1.17
diff -r1.17 XMLSerializer.java
217c217
<             // following an element.
---
>             // following an element or a comment
219c219
<                  ( state.empty || state.afterElement ) )
---
>                  ( state.empty || state.afterElement || state.afterComment
) )
335c335
<             if ( _indenting && ! state.preserveSpace && state.afterElement
)
---
>             if ( _indenting && ! state.preserveSpace && (state.afterElement
|| state.afterComment) )
344a345
>         state.afterComment = false;
391c392
<                  ( state.empty || state.afterElement ) )
---
>                  ( state.empty || state.afterElement || state.afterComment
) )
585c586
<                  ( state.empty || state.afterElement ) )
---
>                  ( state.empty || state.afterElement || state.afterComment
) )
647a649
>             state.afterComment = false;



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