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

Re: Param Element

Subject: Re: Param Element
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Thu, 2 Jun 2005 21:59:13 -0700
Re:  Param Element
Sorry : )

Structure is:

<in_proc>
 <row />
 <row />
 ...
</in_proc>

On 6/2/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > Michael:  the content of the source xml is the persisted state of the
> > supplied xm data param.
>
> That tells me absolutely nothing about the structure of either.
>
> Let's be concrete. Is the outermost element of your source XML caled <row>
> or is it called <in_proc>? If it's called <row> then I can point to one set
> of errors in your stylesheet, if it's called <in_proc> then I can point to
a
> different set. It's possible that your stylesheet is written to allow it to
> be either, but that seems unlikely.
>
> Michael Kay
> http://www.saxonica.com/
>
>
> xm data param may or may not contain new
> > data.  This data is appended to the xml source when it is new.  There
> > is an id column named "activityid" which allows me a guarantee of
> > unique matches.
> >
> >
> >
> >
> > On 6/2/05, David Carlisle <davidc@xxxxxxxxx> wrote:
> > >
> > >   It is working...
> > >
> > > This seems unlikely.
> > >
> > >   I'm still a little confused on the parm(s) but no worries!
> > >
> > >   On 6/2/05, Karl Stubsjoen <kstubs@xxxxxxxxx> wrote:
> > >   > Here is what I have, but not confident that it is
> > working... it seems
> > >   > that my check for uniqueness is failing, I get no
> > results.  Isn't it a
> > >   > fair test to ask of a value it it exists in a set of
> > values as I am
> > >   > here:
> > >   >  <xsl:if test="$current_id = $activity_id">
> > >   > Where activity_id is a set of ID values as defined below..
> > >   >
> > >   > <xsl:param name="xm" select="in_proc" />
> > >   >
> > >   > <xsl:variable name="activity_id" select="in_proc/row/@id"/>
> > >   >
> > >   > <xsl:template match="/">
> > >   >  <in_proc>
> > >   >  <xsl:apply-templates select="row"/>
> > >   >  <xsl:apply-templates select="$xm/row" mode="append"/>
> > >   >  </in_proc>
> > >   > </xsl:template>
> > >   >
> > >   > <xsl:template match="row">
> > >   >  <xsl:copy-of select="."/>
> > >   > </xsl:template>
> > >   >
> > >   > <xsl:template match="row" mode="append">
> > >   >  <xsl:variable name="current_id" select="@id"/>
> > >   >  <xsl:if test="$current_id = $activity_id">
> > >   >    <xsl:copy-of select="."/>
> > >   >  </xsl:if>
> > >   > </xsl:template>
> > >   >
> > >   > </xsl:stylesheet>
> > >   >
> > >   >
> > >
> > >
> > >  <xsl:apply-templates select="row"/>
> > >  <xsl:template match="row">
> > >  <xsl:copy-of select="."/>
> > >  </xsl:template>
> > >
> > > is equivalent (but slower, probably) to
> > > <xsl:copy-of select="row"/>
> > > it just copies all the row elements. In this case however it prduces
> > > nothing as there are no row element children of the current
> > node (the
> > > only child of / is a in_proc element (I guess, you have not
> > shown your
> > > input format)
> > >
> > >  <xsl:if test="$current_id = $activity_id">
> > > this test is always true (given the default value of $xm)
> > as $current_id
> > > is an attribute node from the set $activity_id
> > > Even if you supply an xm parameter so that the tests may be false,
> > >
> > >  <xsl:apply-templates select="$xm/row" mode="append"/>
> > >  <xsl:template match="row" mode="append">
> > >  <xsl:variable name="current_id" select="@id"/>
> > >  <xsl:if test="$current_id = $activity_id">
> > >    <xsl:copy-of select="."/>
> > >  </xsl:if>
> > >  </xsl:template>
> > >
> > > is equivalent to
> > >
> > > <xsl:copy-of select="$xm/row[@id = $activity_id]"/>
> > >
> > > David
> > >
> > >
> > ______________________________________________________________
> > __________
> > > This e-mail has been scanned for all viruses by Star. The
> > > service is powered by MessageLabs. For more information on
> > a proactive
> > > anti-virus service working around the clock, around the
> > globe, visit:
> > > http://www.star.net.uk
> > >
> > ______________________________________________________________
> > __________

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.