[Bug 5492] xs:schema lines too long

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5492





--- Comment #3 from C. M. Sperberg-McQueen <cmsmcq@w3.org>  2008-11-13 20:18:24 ---
I've looked at this now, and the cause is simple:  the version of
the schema included in the HTML is generated by an XSLT stylesheet
performing a near-identity transform on the document (and adding a 
comment near the top).  Since the standard serializer in most
XSLT implementations don't introduce newlines between attributes
in a start-tag, the start-tags get output onto single lines.  In
the case of this particular start-tag, that makes the line too long.

There are several possible fixes that come to mind.  In increasing
order of the amount of effort they require, and (unfortunately) also
in increasing order of desirability (at least, as it appears to me),
the ones that occur to me first include:

1 grin and bear it.  For WG-internal copies, just live with it.
For publications, change the HTML manually by introducing newlines
at appropriate points.  (Add an entry to the editors' publication
checklist, so it doesn't get forgotten.)

2 find an XML parser which (like xmllint and rxp) produces as
output a canonical form of its input, and which also takes
parameters for introducing line wraps to keep lines from getting
too long.  (Unfortunately, as far as I can tell neither xmllint
nor rxp currently accept such line-wrap parameters or options.)

3 replace the XSLT transformation of the schema with a simple
copy; take the text added by the XSLT and introduce it into
the source maintained by the editors.  

4 modify the serialization module to understand about requests
to wrap start-tags between attributes to keep the lines from
getting too long.  Or, more simply, write an XSLT stylesheet
to function as a serializer, and make it accept appropriate
parameters for line length and related behaviors.

It would be interesting to write a serialization stylesheet
of type 4 as a sort of XML pretty-printer, but I do not foresee
having sufficient time to do so in the next few months.

So my current recommendation to the editors is:  1 or 3.  If you
choose 3 and need help getting it to work, let me know.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 13 November 2008 20:18:32 UTC