[Product-Developers] Inline Comments in XDV

Laurence Rowe l at lrowe.co.uk
Fri Feb 18 00:46:23 UTC 2011



Mikko Ohtamaa wrote:
> 
> 
> Chris Heiland wrote:
>> 
>> I totally get conditional comments. However, we need a way to comment
>> our xsl transforms inline as some can reach 80-100 lines. We really
>> don't want these comments to reach the general public. Can you think
>> of anything we could do here?
>> 
> 
> This problem is not limited to XDV, but bugs every XML based template etc.
> language out there (TAL with Plone).
> 
> No one is going to use comment if you need to type <tal:comment
> replace="nothing">This is a comment</tal:comment> - boilerplate is longer
> than the actual comment. XML comments is the natural way to comment XML.
> 
> So I suggest...
> 
> <!-- This would be a comment filtered out -->
> 
> <!--- This would be a comment appearing in output  -->
> 
> The default behavior of XML comment would be *not* to appear in output, so
> that commenting your code is made simple as possible.
> 
> ... Can XML parsers and transformers can do it?
> 
> 

It's not immediately clear which one gets filtered out. That doesn't work as
you need to support the output of conditional comments like <!--[if IE 6]>
as well as all sorts of weird and wonderful formats that may be needed for
proxying server includes.

Perhaps we could have something like:

<copy css:theme="#foo" filter-comments="true">
   <!-- filtered out comment -->
</copy>

Laurence
-- 
View this message in context: http://plone.293351.n2.nabble.com/Inline-Comments-in-XDV-tp6029402p6038262.html
Sent from the Product Developers mailing list archive at Nabble.com.



More information about the Product-Developers mailing list