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

RE: presenting xml elements as they appear in the sour

Subject: RE: presenting xml elements as they appear in the source file
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 27 Apr 2010 19:36:46 +0100
RE:  presenting xml elements as they appear in the sour
If you're using Saxon there's saxon:serialize() which returns a string
representation of the lexical XML, which you can insert into your HTML

Another trick that works in most environments, despite being deprecated, is
to use the old <xmp> tag in HTML:

 <xsl:copy-of select="$element"/>


Michael Kay

> -----Original Message-----
> From: Rod Kane [mailto:rkane@xxxxxxxxxxxxxxxxxx]
> Sent: 27 April 2010 18:55
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  presenting xml elements as they appear in the
> source file
> Hello,
> In general can anyone suggest how to display xml nodes as
> they appear in the source file? If there is an easy way of
> doing this it will assist with this problem:
> I'd like to use xsl to prepare an html document but at
> certain points the xml becomes an arbitrary mix of nodes,
> think of a number of a number of legal/valid elements that
> can be arranged in arbitrary ways, such as a nested query.
> Since the composition of the query is unpredictable it is
> necessary to just present the nodes as they are in the source
> xml, complete with the < > brackets, to make things easy.
> I see that there are examples of presenting xml in trees and
> that may be a bit time consuming for a beginner to implement
> so simply listing the elements verbatim is fine for now.
> Thank you
> Rod

Current Thread


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.
First Name
Last Name
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.