Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Grouping into a table (for vertical alignment)

From: Wendell Piez <wapiez@---------------->
To:
Date: 6/1/2004 7:11:00 AM
Daniel,



Nice job. Glad it's working.



      <xsl:when test="position() = 1 or not(preceding-sibling::info or
preceding-sibling::input or preceding-sibling::password or
preceding-sibling::memo or preceding-sibling::check or
preceding-sibling::radio or preceding-sibling::combo)">

Are you sure you don't need to see if just the immediately preceding 
sibling is one of those elements?



<a>
<info>
<b>
<c>
<info>
<d>

This will test true for <c> as well as for <b> or <d>.



(I haven't traced the code well enough to know for sure: maybe this 
distinction comes out in the wash.)



Likewise
    <xsl:if test="following-sibling::info or following-sibling::input or
following-sibling::password or following-sibling::memo or
following-sibling::check or following-sibling::radio or
following-sibling::combo">

You might need to be checking just the single sibling immediately 
following, not all the elements on that axis.



test="following-sibling::*[1][self::info or self::input or self::password or
                              self::memo or self::check or self::radio or
                              self::combo]"

(Note that I haven't actually tested and don't know these to be bugs for a 
fact: I'm just suspicious.)



If this is the case, the logic



    <xsl:if test="following-sibling::info or following-sibling::input or
following-sibling::password or following-sibling::memo or
following-sibling::check or following-sibling::radio or
following-sibling::combo">
      <xsl:for-each select="following-sibling::node()[1]">
        <xsl:call-template name="lineInTable"/>
      </xsl:for-each>
    </xsl:if>

Could be



<xsl:apply-templates mode="lineInTable"

   select="following-sibling::*[1][self::info or self::input or 
self::password or

                                   self::memo or self::check or self::radio or

                                   self::combo]"/>



(and you'd switch that named template to a moded template).



At 11:43 PM 5/30/2004, you wrote:
Just a short comment, when using <xsl:call-template/> you cannot use a
"select="... really find that inconvienent.

That's what modes are for.



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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent