xsl-list
[Top] [All Lists]

Re: "--" question

2003-04-07 11:53:43




From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
I'm not quite sure what to suggest you should do about it, though!

Surely the best solution is not to put the javascript into a comment

Maybe I'm missing the idea here, but from the viewpoint that this is a
comment, I feel that I ought to have the leeway to put nearly any
character
combination together within a comment and have the parsing processor
ignore
that combo.  I recognize this is not standard for xslt, and I'm curious
what
the reasoning is for it.  Placing a significant number of
&#decimalOrName;
within xslt diminishes the understanding and reading capability of the
original XSLT file.  This is especially true when trying to translate
some
'comment' text into usable scripting for the output generated.

The string '--' cannot appear in a comment.  Otherwise, the document will
not be well-formed:

   http://www.w3.org/TR/REC-xml#sec-comments

The XSLT recommendation requires that processors ensure this does not
happen:

   http://www.w3.org/TR/xslt#section-Creating-Comments

If the XML recommendations codified whatever people "feel" is correct,
we'ed be in a sorry state.  You may not agree with how things work, but the
behavior you're seeing is correct.

Dave


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>