xsl-list
[Top] [All Lists]

Re: [xsl] Selection help

2015-11-30 16:49:48
    <xsl:for-each select="table">
      <xsl:sort select="." />

there is only one table  so xsl:sort is doing nothing

Right, the full XML used as input has many, I neglected to mention
that I abbreviated.

That could more simply be written

<xsl:variable name="columns" select="column/string(@name)"/>

Nice, I never knew that, appreciate the pointer.


      <xsl:for-each select="$columns">
        <xsl:variable name="foo" 
select="$this/constraint[@type='FOREIGN']/childKey[@name='.']" />

childKey[@name='.']"

selects childKey elements that have string value of their content
equal to their name attribute.
You presumably meant current() not .

Ok, so if that selector looks for the childKey elements whose string value 
matches which
is not what I want, it is the childKey element (there is only one) whose @name 
matches
the for-each's current value, I am not clear on how to leverage current() to 
facilliatte that?

Thanks for all the patience guys,
jlc
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>