[ 
https://issues.apache.org/jira/browse/XALANJ-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510520
 ] 

Eric Kolotyluk commented on XALANJ-2388:
----------------------------------------

Like the current XMLSerializer, if an attribute name/value is 200 characters 
long then you should ignore the output width and just print it on the same 
line. Trying to hyphenate it (or something similar) would be confusing. 
Sometimes you have to accept when you can't make something prettier without 
confusing the human reader.

I'm not particularly sensitive to the order of the attributes, but I (and 
others) are use to seeing them in alphabetical order like XMLSerializer does, 
so reverse alphabetical order would be confusing at first. Is there any 
compelling reason to sort them in reverse alphabetical order?

Our code would never depend on attribute order.

More importantly, while we do reparse pretty-printed code for persistence 
reasons, our code would never be sensitive to anything (rational) the pretty 
printing would do, otherwise we would fix our code accordingly.

- Eric Kolotyluk

> Line wrapping and indenting while pretty-printing
> -------------------------------------------------
>
>                 Key: XALANJ-2388
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2388
>             Project: XalanJ2
>          Issue Type: Improvement
>          Components: Xalan
>    Affects Versions: 2.7
>         Environment: Window XP and Apple OS X
>            Reporter: Eric Kolotyluk
>            Priority: Minor
>
> When using the pretty-printing fearure in LSSeralizer the output looks like
> <?xml version="1.0" encoding="UTF-8"?><Server 
> cookie="-7dfe3a9b:11377ee20de:-7fdd" deviceType="Admin" failureText="Protocol 
> Version not supported" friendlyName="CSMP2610" ipAddress="10.1.41.70" 
> licenseStatus="0" macAddress="00-14-22-38-AA-43" result="Failed" 
> serialNumber="09665" type="checkProtocolVersion">
>    <VersionInfo>
>       <AdminServer versionBuild="23" versionMajor="3" versionMinor="1" 
> versionOther="5" versionPatch="5"/>
>    </VersionInfo>
>    <Event eid="85008" hr="0" timeStamp="1183127997"/>
> </Server>
> When using XMLSerializer it looks like
> <?xml version="1.0" encoding="UTF-8"?>
> <Server cookie="-7dfe3a9b:11377ee20de:-7fdd" deviceType="Admin"
>    failureText="Protocol Version not supported" friendlyName="CSMP2610"
>    ipAddress="10.1.41.70" licenseStatus="0" macAddress="00-14-22-38-AA-43"
>    result="Failed" serialNumber="09665" type="checkProtocolVersion">
>    <VersionInfo>
>       <AdminServer versionBuild="23" versionMajor="3" versionMinor="1" 
> versionOther="5" versionPatch="5"/>
>    </VersionInfo>
>    <Event eid="85008" hr="0" timeStamp="1183127997"/>
> </Server>
> where elements with a long list of attributes are wrapped and indented to 
> make the XML more readable. LSSerializer should do the same. It would also be 
> nice to specify the maximum line width in the API, otherwise a default of 80 
> or 100 characters would be fine (or whatever the default is used in 
> XMLSerializer).
> While this problem is trivial, it is blocking me from converting my code from 
> using the deprecated XMLSerializer to using the official LSSerializer instead.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to