[Product-Developers] Inline Comments in XDV

Laurence Rowe l at lrowe.co.uk
Wed Feb 16 00:18:31 UTC 2011



Chris Heiland wrote:
> 
> With collective.xdv installed and transforming our custom theme, we'd
> like to comment the various things happening with the inline xsl.
> Based on the tests in the xdv package, we can add a comment outside of
> a xdv rule like so:
> 
>  $ cat xinclude/included-rules.xml
> 
> <rules xmlns="http://namespaces.plone.org/xdv"
>     xmlns:css="http://namespaces.plone.org/xdv+css">
> 
>     <!--comment-->
>     <copy css:theme="#target" css:content="body > *"/>
> 
> </rules>
> 
> And all tests still pass.  However, if we do something like this in
> the same file:
> 
> <rules xmlns="http://namespaces.plone.org/xdv"
>     xmlns:css="http://namespaces.plone.org/xdv+css">
> 
>     <replace css:theme="#target">
>     <p>Foo Bar</p>
>     <!--comment-->
>     </replace>
> 
> </rules>
> 
> The comment actually comes through to the output html and we get the
> expected test failure. We are using some fairly extensive
> transformations and we would really appreciate the ability to comment
> the xsl without passing on those comments to the output html. This is
> possible with mod_transform and not using inline xsl, but is there
> anything we can do to salvage our future sanity?
> 

Put the comments outside the rule tag perhaps? Unfortunately comments can be
meaningful in HTML for Internet Explorer and I've needed the ability to
insert a conditional comment from a rule.

Laurence

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



More information about the Product-Developers mailing list