xsl-list
[Top] [All Lists]

Re: defining sections

2005-11-25 11:16:38
I wrote:
a simpler approach would be:

<xsl:template match="root">
      <root>
              <artefact doc_ref="{$DOC_REF}" type_id="1">
                      <xsl:apply-templates select="data"/>
              </artefact>
      </root>
</xsl:template>

<xsl:template match="data[following-sibling::data
                      [.='Design Derived Requirements']]">
      <before>
              <xsl:value-of select="."/>
      </before>
</xsl:template>

<xsl:template match="data">
      <after>
              <xsl:value-of select="."/>
      </after>
</xsl:template>


The first data template handles all data elements which have
a "Design Derived Requirements" following sibling.

The second data template is used for the other data elements.
It has higher implicit priority so there is no need for a
predicate expression here.
lower implicit priority, of course.

Regards,
Markus


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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