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

Re: Need advise on filtering XSL

Subject: Re: Need advise on filtering XSL
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 28 Jan 2003 15:25:48 GMT
Re:  Need advise on filtering XSL
> as you can see in the comments the output method has been set to text
> so that &lt; and &gt; would be treated properly. Elsewhere I have read
> that this is not a recommended way of creating an output XML.  

You do lose most (or at least many) of the benefits of XSL if you do
this. The point of XSLT is that it consists of "templates" that are fragments
of the output tree, but in your case you are not constructing a tree at
all, just a flat string that happens to have some , and > in.

> I thought it would be possible to use <xsl:copy-of select="."/> in the
> two template match functions at the bottom, but it did not work
> correctly.

that would copy all the nodes from the source, but as you have asked for
text output, you onlyget text nodes serialised, all element and
attribute nodes are discarded.

> It's probably not a good style to post complete source code examples,

On the contray, it's _much_ easier to answer questions of the form
test input - test style - test result - required resulut.
than to answer questions with a vague description of a possible problem
in some unspecified program. (We get a lots of both sorts of question on
this list:-)


Basically you want an identity transform with some modified templates,
the FAQ has an example here
http://www.dpawson.co.uk/xsl/sect2/identity.html#d4096e43

How complicated are your parameters $filterstmt, if they are not
complicated you may be able to do without using the evaluate() 
extension function as well.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.