Re: [xsl] "--" question

Subject: Re: [xsl] "--" question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 7 Apr 2003 22:36:45 +0100
   >From: David Carlisle <davidc@xxxxxxxxx>
   > > 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 

Well my point here was that there is no good reason to put the script in
a comment at all, however to answer your general point:

   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.  

It's nothing to do with XSLT it's just the syntax of XML comments.
You can put nearly any character combination, the only thing you can't
put is the combination that was attempted namely --. You might have
expected that it was only --> that was not allowed but -- is not allowed
for compatibility with SGML where -- would have terminated the comment.

   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.

I'm not sure what character references have to do with comments, & is
not special inside a comment so in fact you can not have a character
reference there. &#160; is 6 characters inside a comment text, not one
non breaking space character as it would be in element content.
Also Whether you put the text in a comment or an element has no effect 
on whether or not you need to use a character reference in the XSLT
file, which is just depends on whether the encoding includes that
character: If you use the default utf8 encoding you never need to use
character references.


 XSL-List info and archive:

Current Thread