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

Re: Recursively link XML blocks

Subject: Re: Recursively link XML blocks
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 20 Nov 2001 12:13:48 -0500
link .xml
Costantino:

What about --

<xsl:template match="insert">
  <xsl:apply-templates select="//*[local-name()=current()]"/>
</xsl:template>

Won't that do it?

Cheers,
Wendell

At 04:44 AM 12/20/01, you wrote:


Hello everybody,
I am trying (without success, at the moment...) to do the following:

XML document:
...
<element_A>
     textA textA textA
     <insert>element_B</insert>
     textA textA textA
</element_A>

<element_B>
     textB textB textB
     <insert>element_C</insert>
     textB textB textB
</element_B>

<element_C>
     textC textC textC
     textC textC textC
</element_C>
....etc.

Desired output:
     textA textA textA
     textB textB textB
     textC textC textC
     textC textC textC
     textB textB textB
     textA textA textA

In other words, I would like to "link" elements to other elements, and compose a
new document "recursively".
This is exactly the same behaviour that I may obtain by changing my "content
architecture", and putting all the text directly in the XSL, and then using
"xsl:call-template"s to include one block in another.
But if I do that I have to mix pure text with layout definitions (I want to
output HTML and FO from the XML) - and therefore I will have to maintain two
sets of documents.
Does anybody have a suggestion?
Thank you very much,


======================================================================
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.