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

Re: simple question with <xsl:copy-of>

Subject: Re: simple question with <xsl:copy-of>
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 17 Jul 2001 11:43:07 -0400
simple xsl copy
Roman,

This sounds like a job for the stepwise identity transform -- check out the XSLT spec, section 7.5. (Or it must be in the XSL FAQ: look for 'identity'.)

Oh, heck:

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

That will copy all the nodes on at a time; you can add templates to override it for the specialized processing you need.

Cheers,
Wendell

At 10:31 AM 7/17/01, you wrote:
Hi alltogther!

I've just a simple questtion: How can I copy all the tags from the body
of my XML-source document into my XSL-stylesheet in order of their
occurance and additionally adapt some of these tags with additional
templates?
I thought that I could make it with a simple <xsl:copy-of>, but the I
just get all the text nodes....


<xsl:template match="body">


                                        <form method="post">
                                                <xsl:attribute
name="action">
                                                        <xsl:value-of
select="$all"/>
                                                </xsl:attribute>
                                                <xsl:copy-of
select="."/>
                                                <xsl:apply-templates/>
                                        </form>
                                </xsl:template>

                                <xsl:template match="foo">
                                        .....

</xsl:template>




Could you please help me?


Yours,
Roman



> Roman Huditsch (RH )
> _____________________________________________________________________
> hico Informations- und Kommunikations-Management Gesellschaft m.b.H.
> TechLab, Thomas A. Edison Straße 2.
> A-7000 Eisenstadt / Austria
> phone: +43/2682/704-61-00; fax: +43/2682/704-71-61-10
> e-mail:support@xxxxxxxx;  r.huditsch@xxxxxxxx
>
>

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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