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

Re: copy-of question

Subject: Re: copy-of question
From: "Franz Figl" <frafi@xxxxxxxxxx>
Date: Thu, 19 Apr 2001 22:13:30 +0200
Re:  copy-of question
Jeni, thanks again for the good explanation. Now I am beginning to
understand...
Franz




> Hi Franz,
>
> > Jeni, I don't have a deep copy here (I want the complete original
> > html table inside the xml), but only the table text cells as output
>
> Sorry - I don't understand what you mean by the above. Let me try
> again. You said:
>
> > how can I extract only one element in original form?
> > copy-of seems to work here, but I have all the other unwanted tags also
as
> > plain text.
> > Is this related to the default rules?
> >
> >  <xsl:template match="TABLE">
> >    <xsl:copy-of select="."/>
> >  </xsl:template>
>
> If this is the only template you have in your stylesheet, it will give
> you a (deep) copy of any TABLE elements in your document.  The rest of
> the nodes in the stylesheet (aside from those under the TABLE
> elements) will have the built-in templates applied to them.  The
> effect of these built-in templates is that you get the text of the
> rest of the document output.
>
> If you don't want that text to be output, then adding the empty
> template:
>
> <xsl:template match="text()" />
>
> will stop it being output.  You'll still get the (deep) copy of the
> TABLE elements, but this seemed to be what you were after (you said
> that was working).
>
> If you have a stylesheet with these two templates in it, and you're
> only getting the text of the table cells in your output, then I bet
> you've got an xsl:output instruction that looks like:
>
> <xsl:output method="text" />
>
> Take out that xsl:output instruction, or replace it with one that
> looks like:
>
> <xsl:output method="xml" />
>
> If you use the 'text' method, the XSLT processor doesn't output any
> elements that you create, only text nodes.
>
> I hope that helps,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 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.