User Profile

Collapse

Profile Sidebar

Collapse
rayt
rayt
Last Activity: Aug 11 '06, 09:41 AM
Joined: Oct 6 '05
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I just noticed that in Johannes template the apply-templates does not implicitly tie in with the template. In the posting above notice how the predicate is applied to the apply-template select and the the template match clauses. Another way is to tie the two together by using mode.

    Ray
    See more | Go to post

    Leave a comment:


  • All Rows would not be passed to output using the solution by Johannes

    <xsl:apply-templates select="result[@status='Pass']"/>

    ....

    <xsl:template s match="result[@status='Pass']"/>
    <tr>
    <xsl:if test="position( ) mod 2 = 1">
    <xsl:attribut e name="class">od d</xsl:attribute>
    </xsl:templates>
    <!--...
    See more | Go to post

    Leave a comment:


  • Combine the if with the select then you can choose odd and even.

    <xsl:for-each select="result[@status = 'Pass']">

    Ray
    See more | Go to post

    Leave a comment:


  • rayt
    replied to Grouping, duplicates Muenchian appears to fail
    in XML
    Working Solution

    At last I’ve got the swine, well almost, I need to fix the trailing comma (<xsl:if test="position( ) != last()">,</xsl:if> does not work as I cannot guarantee position).


    I know it probably has flaws but it works. If anybody has a better way could you let me know or if anybody knows a clever way to get rid of the trailing comma I’d be grateful.


    Code:
    <?xml
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 9 '09, 07:10 AM. Reason: added [code] tags

    Leave a comment:


  • rayt
    started a topic Grouping, duplicates Muenchian appears to fail
    in XML

    Grouping, duplicates Muenchian appears to fail

    I’m relatively new to XSLT and must admit I’m finding it refreshing, but every now and again something comes along which floors me. Maybe it’s the old imperative language background that is hard to shake. This is an example of a dark cloud in my brave new declarative world. Clearing duplication is bread and butter but in XSLT it’s not. The old preceding axis method is both too slow and destined to failure. The Muenchian method, although sublime...
    See more | Go to post
    Last edited by Dormilich; Jan 9 '09, 07:09 AM. Reason: added [code] tags
No activity results to display
Show More
Working...