xsl-list
[Top] [All Lists]

RE: XSLT: Are XML Comments parseable?

2005-09-20 05:27:31
Hello,

I am still struggling with comment parsing:

My XML file:

<?xml version="1.0" encoding="UTF-8"?>
<!--pear-->
<fruit>apple</fruit>


My XSLT:

        <xsl:template name="GetComment" match="comment()">
                <c>
                        <xsl:value-of select="."/>
                </c>
        </xsl:template>


I would like to get only <c>pear</c> as output.

However I get as output the following:

<c>pear</c>apple


How do I fix that?

Many Thanks,
Houman


-----Original Message-----
From: Emmanouil Batsis [mailto:Emmanouil(_dot_)Batsis(_at_)eurodyn(_dot_)com] 
Sent: 24 August 2005 12:12
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] XSLT: Are XML Comments parseable?

Khorasani, Houman wrote:

Hello,

Is it possible to read an XML comment through XSLT 1.0, use the Comment
as a String value to produce an XML file?
 


<template match="comment()">
   

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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