|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: keeping source element after template applied?
Kevin,
Apparently you're assuming that a node is "kept" or "gotten rid of" by the processor, but it isn't so. Rather, nodes in the source tree are always there -- the processor can always look at the source tree and none of it is ever thrown away. The processor's job is to *build* a result tree that starts with nothing in it (or actually, with nothing in it but a root node). What it adds to this result (the "tree" it "builds", in the topsy-turvy world of XML metaphors) depends on your stylesheet. So your question can be reframed as "is it possible to apply more than one template to a node", leaving out whether the element is "removed". (It'll never be removed from the source tree. Whether a *copy* of it *ever* appears in the result, is up entirely to you. By default, the processor will copy text nodes, but not elements as such.) If you could be more specific, or (better) show us a bit of code, we could make a better guess as to whether you would be best off: (a) matching your element with a template that does something, then applies a second template, in another mode, to its own context node (thereby getting two different templates applied); (b) using <xsl:call-template> to call a template by name from your matching template; (c) splitting your stylesheet into pieces and using <xsl:apply-imports/>, which allows one stylesheet to invoke a "backup" template of a lower import precedence (matching the same element); (d) something altogether different.... Cheers, Wendell At 05:41 PM 12/3/2002, you wrote: Hi, ====================================================================== 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








