This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: comments


Kevin,

To add to what Mike says: it isn't hard to write a couple of templates 
based on the identity transform, that will match elements and attributes, 
and write out text that looks just like markup. Put them in a separate mode 
so they are not invoked during normal traversal. These templates can be 
called inside your <xsl:comment> instruction, and will give you what you want.

Addressing a different question, I actually posted code that does this back 
in June. Check out the archives, 
http://www.biglist.com/lists/xsl-list/archives/200106/msg01293.html.

Good luck,
Wendell

At 04:38 AM 9/20/01, Mike wrote:
> > I want to insert XSL:Elements inside XSL:Comments. I am
> > getting an error
> > when trying to do this.
> > Not sure why this isn't acceptable.
>
>XML comments can include angle brackets as ordinary characters. You can use
>them for things that look like markup, e.g.
>
><!-- <br/> -->
>
>but they aren't really markup, because you can also write
>
><!--<<<<>>>> <br was here/> <<<<>>>>-->
>
>which clearly wouldn't parse as an "element within a comment".
>
>So if you want to generate anagle brackets inside a comment, you need to
>generate them as ordinary charaters, not as serialized element nodes.


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]