You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Jürgen Ragaller <ra...@null-oder-eins.ch> on 2007/07/02 11:55:43 UTC
[1.4] - using xsl:comment (for conditional comments)
Hi there!
To make Internet Explorer happy I'd like to use conditional comments
(for ie css).
(http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
To insert a comment in the xsl I use:
<xsl:comment>Conditional comment here</xsl:comment>
This was working a while ago - but with the current svn version the
comment is not present in the output - so the question boils down to
«how do I insert a html-Comment»?
I switched the pretty printing step off in our sitemap.xmap.
Help is very appreciated!
Jürgen Ragaller
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: [1.4] - using xsl:comment (for conditional comments)
Posted by Jörn Nettingsmeier <ne...@apache.org>.
should we apply this fix to the trunk? it makes sense imho.
Phillip Green wrote:
> I had a problem very similar to this. I found that my problem was with
> strip_namespaces.xsl. It seems to strip out comments as well as
> namespaces. Therefore I overwrote the original strip_namespaces.xsl
> file by creating one at <publication>/lenya/xslt/util
>
> Here is the file I made:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="http://www.w3.org/1999/xhtml">
>
> <xsl:import
> href="template-fallback://lenya/xslt/util/strip_namespaces.xsl"/>
>
> <!-- Added to maintain comments -->
> <xsl:template match="comment()">
> <xsl:copy/>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> Hopefully this will help,
>
> Phillip
>
>>>> "Gav...." <br...@brightontown.com.au> 7/2/2007 8:52 AM
>>>>
>
>
>> -----Original Message-----
>> From: Jürgen Ragaller [mailto:ragaller@null-oder-eins.ch]
>> Sent: Monday, 2 July 2007 5:56 PM
>> To: user@lenya.apache.org
>> Subject: [1.4] - using xsl:comment (for conditional comments)
>>
>> Hi there!
>>
>>
>> To make Internet Explorer happy I'd like to use conditional comments
>> (for ie css).
>> (http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
>>
>> To insert a comment in the xsl I use:
>> <xsl:comment>Conditional comment here</xsl:comment>
>>
>> This was working a while ago - but with the current svn version the
>> comment is not present in the output - so the question boils down to
>> «how do I insert a html-Comment»?
>> I switched the pretty printing step off in our sitemap.xmap.
>
> I've not tried it on Lenya, nor know it well enough to know if a
> better
> solution exists, but ..
>
> Have you tried wrapping the HTML Comments in a CDATA block ....
>
> <xsl:comment><![CDATA[Conditional comment here ]]></xsl:comment>
>
> might work (might not)
>
> Gav...
>
>>
>> Help is very appreciated!
>>
>>
>> Jürgen Ragaller
>>
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
--
Jörn Nettingsmeier
Kurt is up in heaven now.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [1.4] - using xsl:comment (for conditional comments)
Posted by Jörn Nettingsmeier <ne...@apache.org>.
should we apply this fix to the trunk? it makes sense imho.
Phillip Green wrote:
> I had a problem very similar to this. I found that my problem was with
> strip_namespaces.xsl. It seems to strip out comments as well as
> namespaces. Therefore I overwrote the original strip_namespaces.xsl
> file by creating one at <publication>/lenya/xslt/util
>
> Here is the file I made:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="http://www.w3.org/1999/xhtml">
>
> <xsl:import
> href="template-fallback://lenya/xslt/util/strip_namespaces.xsl"/>
>
> <!-- Added to maintain comments -->
> <xsl:template match="comment()">
> <xsl:copy/>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> Hopefully this will help,
>
> Phillip
>
>>>> "Gav...." <br...@brightontown.com.au> 7/2/2007 8:52 AM
>>>>
>
>
>> -----Original Message-----
>> From: Jürgen Ragaller [mailto:ragaller@null-oder-eins.ch]
>> Sent: Monday, 2 July 2007 5:56 PM
>> To: user@lenya.apache.org
>> Subject: [1.4] - using xsl:comment (for conditional comments)
>>
>> Hi there!
>>
>>
>> To make Internet Explorer happy I'd like to use conditional comments
>> (for ie css).
>> (http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
>>
>> To insert a comment in the xsl I use:
>> <xsl:comment>Conditional comment here</xsl:comment>
>>
>> This was working a while ago - but with the current svn version the
>> comment is not present in the output - so the question boils down to
>> «how do I insert a html-Comment»?
>> I switched the pretty printing step off in our sitemap.xmap.
>
> I've not tried it on Lenya, nor know it well enough to know if a
> better
> solution exists, but ..
>
> Have you tried wrapping the HTML Comments in a CDATA block ....
>
> <xsl:comment><![CDATA[Conditional comment here ]]></xsl:comment>
>
> might work (might not)
>
> Gav...
>
>>
>> Help is very appreciated!
>>
>>
>> Jürgen Ragaller
>>
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
--
Jörn Nettingsmeier
Kurt is up in heaven now.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: [1.4] - using xsl:comment (for conditional comments)
Posted by Jürgen Ragaller <ra...@null-oder-eins.ch>.
Am 02.07.2007 um 15:05 schrieb Phillip Green:
> I had a problem very similar to this. I found that my problem was
> with
> strip_namespaces.xsl. It seems to strip out comments as well as
> namespaces. Therefore I overwrote the original strip_namespaces.xsl
> file by creating one at <publication>/lenya/xslt/util
>
> Here is the file I made:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="http://www.w3.org/1999/xhtml">
>
> <xsl:import
> href="template-fallback://lenya/xslt/util/strip_namespaces.xsl"/>
>
> <!-- Added to maintain comments -->
> <xsl:template match="comment()">
> <xsl:copy/>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> Hopefully this will help,
hurray - great; works nicely!
Thanks, Phillip
Jürgen
>
> Phillip
>
>>>> "Gav...." <br...@brightontown.com.au> 7/2/2007 8:52 AM
>>>>
>
>
>> -----Original Message-----
>> From: Jürgen Ragaller [mailto:ragaller@null-oder-eins.ch]
>> Sent: Monday, 2 July 2007 5:56 PM
>> To: user@lenya.apache.org
>> Subject: [1.4] - using xsl:comment (for conditional comments)
>>
>> Hi there!
>>
>>
>> To make Internet Explorer happy I'd like to use conditional comments
>> (for ie css).
>> (http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
>>
>> To insert a comment in the xsl I use:
>> <xsl:comment>Conditional comment here</xsl:comment>
>>
>> This was working a while ago - but with the current svn version the
>> comment is not present in the output - so the question boils down to
>> «how do I insert a html-Comment»?
>> I switched the pretty printing step off in our sitemap.xmap.
>
> I've not tried it on Lenya, nor know it well enough to know if a
> better
> solution exists, but ..
>
> Have you tried wrapping the HTML Comments in a CDATA block ....
>
> <xsl:comment><![CDATA[Conditional comment here ]]></xsl:comment>
>
> might work (might not)
I tried CDATA stuff - the comments created like this are eaten up
(probably by strip_namespaces.xsl as Phillip pointed out).
Thanks, Gav
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: [1.4] - using xsl:comment (for conditional comments)
Posted by Jörn Nettingsmeier <ne...@apache.org>.
Andreas Hartmann wrote:
> Jörn Nettingsmeier schrieb:
>> should we apply this fix to the trunk? it makes sense imho.
>
> +1
ok, it's in. thanks phillip for providing this patch!
--
Jörn Nettingsmeier
Kurt is up in heaven now.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: [1.4] - using xsl:comment (for conditional comments)
Posted by Andreas Hartmann <an...@apache.org>.
Jörn Nettingsmeier schrieb:
> should we apply this fix to the trunk? it makes sense imho.
+1
-- Andreas
>
>
> Phillip Green wrote:
>> I had a problem very similar to this. I found that my problem was with
>> strip_namespaces.xsl. It seems to strip out comments as well as
>> namespaces. Therefore I overwrote the original strip_namespaces.xsl
>> file by creating one at <publication>/lenya/xslt/util
>>
>> Here is the file I made:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> xmlns="http://www.w3.org/1999/xhtml">
>>
>> <xsl:import
>> href="template-fallback://lenya/xslt/util/strip_namespaces.xsl"/>
>>
>> <!-- Added to maintain comments -->
>> <xsl:template match="comment()">
>> <xsl:copy/>
>> </xsl:template>
>>
>> </xsl:stylesheet>
>>
>>
>> Hopefully this will help,
>>
>> Phillip
>>
>>>>> "Gav...." <br...@brightontown.com.au> 7/2/2007 8:52 AM
>>>>>
>>
>>
>>> -----Original Message-----
>>> From: Jürgen Ragaller [mailto:ragaller@null-oder-eins.ch] Sent:
>>> Monday, 2 July 2007 5:56 PM
>>> To: user@lenya.apache.org Subject: [1.4] - using xsl:comment (for
>>> conditional comments)
>>>
>>> Hi there!
>>>
>>>
>>> To make Internet Explorer happy I'd like to use conditional comments
>>> (for ie css).
>>> (http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
>>>
>>> To insert a comment in the xsl I use:
>>> <xsl:comment>Conditional comment here</xsl:comment>
>>>
>>> This was working a while ago - but with the current svn version the
>>> comment is not present in the output - so the question boils down to
>>> «how do I insert a html-Comment»?
>>> I switched the pretty printing step off in our sitemap.xmap.
>>
>> I've not tried it on Lenya, nor know it well enough to know if a
>> better
>> solution exists, but ..
>>
>> Have you tried wrapping the HTML Comments in a CDATA block ....
>>
>> <xsl:comment><![CDATA[Conditional comment here ]]></xsl:comment>
>>
>> might work (might not)
>>
>> Gav...
>>
>>>
>>> Help is very appreciated!
>>>
>>>
>>> Jürgen Ragaller
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org For
>>> additional commands, e-mail: user-help@lenya.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org For
>> additional commands, e-mail: user-help@lenya.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>>
>
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
RE: [1.4] - using xsl:comment (for conditional comments)
Posted by Phillip Green <Ph...@mail.wvu.edu>.
I had a problem very similar to this. I found that my problem was with
strip_namespaces.xsl. It seems to strip out comments as well as
namespaces. Therefore I overwrote the original strip_namespaces.xsl
file by creating one at <publication>/lenya/xslt/util
Here is the file I made:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:import
href="template-fallback://lenya/xslt/util/strip_namespaces.xsl"/>
<!-- Added to maintain comments -->
<xsl:template match="comment()">
<xsl:copy/>
</xsl:template>
</xsl:stylesheet>
Hopefully this will help,
Phillip
>>> "Gav...." <br...@brightontown.com.au> 7/2/2007 8:52 AM
>>>
> -----Original Message-----
> From: Jürgen Ragaller [mailto:ragaller@null-oder-eins.ch]
> Sent: Monday, 2 July 2007 5:56 PM
> To: user@lenya.apache.org
> Subject: [1.4] - using xsl:comment (for conditional comments)
>
> Hi there!
>
>
> To make Internet Explorer happy I'd like to use conditional comments
> (for ie css).
> (http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
>
> To insert a comment in the xsl I use:
> <xsl:comment>Conditional comment here</xsl:comment>
>
> This was working a while ago - but with the current svn version the
> comment is not present in the output - so the question boils down to
> «how do I insert a html-Comment»?
> I switched the pretty printing step off in our sitemap.xmap.
I've not tried it on Lenya, nor know it well enough to know if a
better
solution exists, but ..
Have you tried wrapping the HTML Comments in a CDATA block ....
<xsl:comment><![CDATA[Conditional comment here ]]></xsl:comment>
might work (might not)
Gav...
>
>
> Help is very appreciated!
>
>
> Jürgen Ragaller
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
RE: [1.4] - using xsl:comment (for conditional comments)
Posted by "Gav...." <br...@brightontown.com.au>.
> -----Original Message-----
> From: Jürgen Ragaller [mailto:ragaller@null-oder-eins.ch]
> Sent: Monday, 2 July 2007 5:56 PM
> To: user@lenya.apache.org
> Subject: [1.4] - using xsl:comment (for conditional comments)
>
> Hi there!
>
>
> To make Internet Explorer happy I'd like to use conditional comments
> (for ie css).
> (http://msdn2.microsoft.com/en-us/library/ms537512.aspx)
>
> To insert a comment in the xsl I use:
> <xsl:comment>Conditional comment here</xsl:comment>
>
> This was working a while ago - but with the current svn version the
> comment is not present in the output - so the question boils down to
> «how do I insert a html-Comment»?
> I switched the pretty printing step off in our sitemap.xmap.
I've not tried it on Lenya, nor know it well enough to know if a better
solution exists, but ..
Have you tried wrapping the HTML Comments in a CDATA block ....
<xsl:comment><![CDATA[Conditional comment here ]]></xsl:comment>
might work (might not)
Gav...
>
>
> Help is very appreciated!
>
>
> Jürgen Ragaller
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org