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

RE: Combining two node Sets into one

Subject: RE: Combining two node Sets into one
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 01 Apr 2005 15:17:09 -0500
xls xml
Hi Chris,

At 12:47 PM 4/1/2005, you wrote:
Everything seems to be working good. (except the sort.. But I think I can
figure that out) However, when I assign the value to a variable and try to
use it later in my stylesheet..as I'm sure you know.. you cannot use most
xpath expression on a tree frag.

You can't query into *any* result tree fragment with an XPath, in unextended XSLT 1.0. The method of running successive transformations in a chain is available only if you pipeline stylesheets, use an extension function, or use XSLT 2.0.


But if you want help on this I'm afraid you'll have to be more explicit, with code samples.

Not fully understanding how your example actually works I can't figure out
how to wrap it so that the data creates my desired table.  If they would
only let me redo the xml. *sigh*.

It's true that the design of your input is pretty lame, but it's not the worst I've ever seen, and the transform really shouldn't be so bad.


But your question was regarding an XML->XML transform, where the target tag set has such elements as <Tamount> and so forth. There's no table there.

I take it you want either (a) to go now from the <Trans> elements into a table (HTML or FO or something else: you haven't said) or (b) to go straight from your source into a table, not into the <Trans> elements at all.

Either of these can be done, and neither goes beyond what's pretty easy to do in a single XSLT 1.0 transformation (no pipelining required).

Thanks for the help.. If you have time can you also explain at a high level
how wrapping an expression in an xml tag works to generate the combined
nodes.. Ie..

<xsl:template match="Damount">
  <Tamount>  <!---xml tag
        <xsl:apply-templates/>
  </Tamount>
</xsl:template>

Well, that's called a "literal result element". Rather than taking the time here to explain it, I'll leave you to the reference books and your favorite search engine to find.


Actually, in view of how basic this is, I'd recommend digging into some of the introductory literature on XSLT, on- or off-line, before posting again. Your questions here would all be answered by a good descriptive overview of the language, how templates work, what literal result elements are etc.

Cheers,
Wendell


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

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.