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

Param Element

Subject: Param Element
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Thu, 2 Jun 2005 11:13:14 -0700
param element
Ok,
I have a slight dilemna in that the single param I am passing to my
stylesheet is the exact copy of the xml source (all though maybe not).
 For sure the structure is the same and a good chance that a few new
elements will exist in the param element.  How do I merge the two
ending up with the unique result of both of them?  The good news is, I
have a unique ID field.
One other dilemna:  in order for the transformation to not complain, I
have to do a select on my parameter declerations which looks like:

<xsl:param name="xm" select="/" />

But since the source is the exact same as the parameter xml, how does
the select know which source to grab from?  Also, the above causes an
overflow when the below transformation is processed, but I need the
top level element of the paramter, which is in_proc, so would it be
correct to express select as:  select="in_proc"?

<xsl:output method="xml"/>
<xsl:param name="xm" select="in_proc" />

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

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

</xsl:stylesheet>

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.