xsl-list
[Top] [All Lists]

Re: defining sections

2005-11-25 07:18:43
sorry but that does not work I get the following
output...

<?xml version="1.0" encoding="UTF-16"?>
<root>
<artefact doc_ref="" type_id="1">
<before>Functional Requirements</before>
<after>Design Derived Requirements</after>
<before>Functional Requirements</before>
<after>Design Derived Requirements</after>
</artefact>
</root>


--- Geert Josten <Geert(_dot_)Josten(_at_)daidalos(_dot_)nl> wrote:

Almost there..

geoff hopkins wrote:
I am really sorry but I am confused big time....

I have:

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

<xsl:apply-templates select="data[(.='Functional
Requirements') or (.='Design Derived
Requirements')]"/>

                    </artefact>
            </root>
    </xsl:template>

    <xsl:template match="data"/>

    <xsl:template match="data[.='Functional
Requirements']">
            <before>
                    <xsl:value-of select="."/>
            </before>
            <xsl:apply-templates select="data[.='Functional


Requirements']/following::data[following::data[.='Design
Derived Requirements']]"

mode="before" />

    </xsl:template>

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

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

mode="after" />

    </xsl:template>

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

But need some sort of output like...

<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<before>Functional Requirements</before>
<before></before>
<before>text</before>
<before></before>
<before>text</before>
<before></before>
<before>text</before>
<before></before>
<before>text</before>
<before>text</before>
<before>text</before>
<before>text</before>
<before>text</before>
<before>text</before>
<before>text</before>
<before>text</before>
<before>text</before>
<before></before>
<before>text</before>
<before></before>
<after>Design Derived Requirements</after>
<after></after>
<after>text</after>
<after></after>
<after>text</after>
<after></after>
<after>text</after>
<after></after>
<after>text</after>
</root>


    
            
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



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



-- 
Drs. G.P.H. Josten
Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht
- is afkomstig van Daidalos BV en is 
uitsluitend bestemd voor de geadresseerde. Indien u
dit bericht onbedoeld hebt ontvangen, verzoeken 
wij u het te verwijderen. Aan dit bericht kunnen
geen rechten worden ontleend.


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




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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