You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luke Penca <lp...@deltasi.com> on 2003/05/20 20:23:48 UTC

XSLT question (this mailing list isn't best but it's the most responsive!)

I have an XML document that has several sequential transformations done on it.  I want to find a specific node in my XML, modify it and send the entire result forward to the next step.

<page>
  <meta />
  <left>
    <item>
  </left>
  <main>
    <item />
    <item />
  </main>
</page>

I want to get the item node first, modify it in place(not move it) and send the entire <page> structure forward to the next step but I cannot seem to figure out (what I would think to be) some very simple XSLT to accomplish this.

Thanks.



Re: XSLT question (this mailing list isn't best but it's the most responsive!)

Posted by Doug Chestnut <dh...@virginia.edu>.
Are you looking to do someting like this?

  <xsl:template match="@*|node()">
    <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
  </xsl:template>

  <xsl:template match="item">
    <newitem/>
  </xsl:template>

--Doug

----- Original Message -----
From: "Luke Penca" <lp...@deltasi.com>
To: <co...@xml.apache.org>
Sent: Tuesday, May 20, 2003 2:23 PM
Subject: XSLT question (this mailing list isn't best but it's the most
responsive!)



I have an XML document that has several sequential transformations done on
it.  I want to find a specific node in my XML, modify it and send the entire
result forward to the next step.

<page>
  <meta />
  <left>
    <item>
  </left>
  <main>
    <item />
    <item />
  </main>
</page>

I want to get the item node first, modify it in place(not move it) and send
the entire <page> structure forward to the next step but I cannot seem to
figure out (what I would think to be) some very simple XSLT to accomplish
this.

Thanks.





----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org