You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Eric Kolotyluk (JIRA)" <xa...@xml.apache.org> on 2007/06/29 19:30:04 UTC

[jira] Created: (XALANJ-2387) Pretty Print Serialization does not put newlines between all elements

Pretty Print Serialization does not put newlines between all elements
---------------------------------------------------------------------

                 Key: XALANJ-2387
                 URL: https://issues.apache.org/jira/browse/XALANJ-2387
             Project: XalanJ2
          Issue Type: Bug
    Affects Versions: 2.7
         Environment: Windows XP and Apple OS X
            Reporter: Eric Kolotyluk
            Priority: Trivial


When pretty-printing is specified in LSSerializer newlines are not placed between all elements. For example.

<?xml version="1.0" encoding="UTF-8"?><User clientName="EKolotyluk_380" clientPlatform="Windows XP (5.1)" clientProtocolVersion="{DB4AEBDF-A4A9-4521-880B-02310D12723B}" clientType="Admin" clientVersion="0.0.0.0" cookie="-7dfe3a9b:11377ee20de:-7fdd" isoLanguageCode="en" sendCompressed="true" type="checkProtocolVersion"/>

the <User> element should start on a new line.

While this is a Trivial problem, it is blocking me from transitioning my code from the deprecated XMLSerializer to the official LSSeralizer.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XALANJ-2387) Pretty Print Serialization does not put newlines between all elements

Posted by "Eric Kolotyluk (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510519 ] 

Eric Kolotyluk commented on XALANJ-2387:
----------------------------------------

Brian, I disagree.

In the case of pretty-printing you 'do' know the intent of what will be done with the generated XML - it will be read by a person who does not care if the newline generates a new node. If someone wants to preserve the syntatic correctness of the XML they they should not use pretty-printing.

I can see no other use for pretty printing than to make it easier for people to read.

- Eric Kolotyluk

> Pretty Print Serialization does not put newlines between all elements
> ---------------------------------------------------------------------
>
>                 Key: XALANJ-2387
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2387
>             Project: XalanJ2
>          Issue Type: Bug
>    Affects Versions: 2.7
>         Environment: Windows XP and Apple OS X
>            Reporter: Eric Kolotyluk
>            Priority: Trivial
>
> When pretty-printing is specified in LSSerializer newlines are not placed between all elements. For example.
> <?xml version="1.0" encoding="UTF-8"?><User clientName="EKolotyluk_380" clientPlatform="Windows XP (5.1)" clientProtocolVersion="{DB4AEBDF-A4A9-4521-880B-02310D12723B}" clientType="Admin" clientVersion="0.0.0.0" cookie="-7dfe3a9b:11377ee20de:-7fdd" isoLanguageCode="en" sendCompressed="true" type="checkProtocolVersion"/>
> the <User> element should start on a new line.
> While this is a Trivial problem, it is blocking me from transitioning my code from the deprecated XMLSerializer to the official LSSeralizer.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XALANJ-2387) Pretty Print Serialization does not put newlines between all elements

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510492 ] 

Brian Minchau commented on XALANJ-2387:
---------------------------------------

Eric,
the fact that there is no newline after the XML header, just before the first element is intentional.

If the generated XML is used as general parsed entity then the extra whitespace before the first element
is a new node. At serialization time we don't know the intent of what will done with the generated XML
so we take the concervative approach.

See discussion at:
http://mail-archives.apache.org/mod_mbox/xml-xalan-j-users/200702.mbox/%3C9067789.post@talk.nabble.com%3E

Pretty printing is something done to look nice to human eyes, but shouldn't make any substantial change
to the underlying XML, and in any case there is no standard on just what sort of whitespace, or how much of it
to inject.  It is too bad that your code depends on a non-standard whitespace issue.

- Brian Minchau



> Pretty Print Serialization does not put newlines between all elements
> ---------------------------------------------------------------------
>
>                 Key: XALANJ-2387
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2387
>             Project: XalanJ2
>          Issue Type: Bug
>    Affects Versions: 2.7
>         Environment: Windows XP and Apple OS X
>            Reporter: Eric Kolotyluk
>            Priority: Trivial
>
> When pretty-printing is specified in LSSerializer newlines are not placed between all elements. For example.
> <?xml version="1.0" encoding="UTF-8"?><User clientName="EKolotyluk_380" clientPlatform="Windows XP (5.1)" clientProtocolVersion="{DB4AEBDF-A4A9-4521-880B-02310D12723B}" clientType="Admin" clientVersion="0.0.0.0" cookie="-7dfe3a9b:11377ee20de:-7fdd" isoLanguageCode="en" sendCompressed="true" type="checkProtocolVersion"/>
> the <User> element should start on a new line.
> While this is a Trivial problem, it is blocking me from transitioning my code from the deprecated XMLSerializer to the official LSSeralizer.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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