[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: comments

Subject: RE: comments
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 20 Sep 2001 13:55:23 -0400
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@xxxxxxxxxxxxxxxx
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.