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

RE: creating top-level elements from within child ele

Subject: RE: creating top-level elements from within child elements
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Tue, 22 Feb 2005 15:02:18 +0200
god module levitation
Hi,

> This is a question I asked earlier in one of my earlier posts
> but didnt
> get any reponse on it. I'm reposting the question only because its
> important for me to get some response even if it is a "No, it cant be
> done" !
>
> I wanted to know if its possible to create a new element say
> 'A2' from
> within the <xsl:apply-template> of 'A1' such that 'A2' is the
> immediate
> child of element 'A' and not 'A1'.
>
> So I want the structure to be
>
> <A>
>     <A1/> <!--has some <xsl:apply-template>-->
>     <A2/>  <!-- being create inside A1's apply-template>
> </A>
>
>
>  and not the default
>
> <A>
>     <A1>
>           <A2/>
>     </A1>
> </A>

Well, it depends on your source and stylesheet. Also, I'm confused about your
terminology: "... from within the <xsl:apply-template> of 'A1'..." Do you mean
the template that generates A1, or the one that matches A1? Anyhow, say you
have source

<foo>

and you stylesheet looks like

<xsl:template match="foo">
  <A1/>
  <A2>
</xsl:template>

You'll end up with

<A1/>
<A2>

You should show us more of your source and stylesheet, to show what
limitations you have.


Cheers,

Jarno - God Module: Levitation

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.