Muench method on attributes problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mabu

    #1

    Muench method on attributes problem

    Hi!

    I coming closer to my problem. I am using the Muenich method to group
    my items within an element. But i was not able to write a correct
    expression to group the elements because of the value of an
    attribute...

    My current statement is:

    <xsl:variable name="selection "
    select="w:p[not(preceding-sibling::w:p) or w:pPr/w:pStyle[@w:val !=
    preceding-sibling::w:p[1]/w:pPr/w:pStyle[@w:val]]] "/>

    When i am using this without the @w:val entries and correct the XML it
    is working - fine ... but i am not able to do this with my XML
    sheet...

    How can i rewrite this expression that it groups the elements by their
    attribute value of w:val
    example entries are:
    =============== =============== =============== =============
    <w:p>
    <w:pPr>
    <w:pStyle w:val="Paragrap hText"/>
    </w:pPr>
    <w:r>
    <w:t>some text between </w:t>
    </w:r>
    </w:p>
    <w:p>
    <w:pPr>
    <w:pStyle w:val="Listing"/>
    </w:pPr>
    <w:r>
    <w:t>listing textt</w:t>
    </w:r>
    </w:p>
    =============== =============== =============== =============


    Thanks for any help, Martin

  • mabu

    #2
    Re: Muench method on attributes problem

    On Fri, 11 Jul 2003 17:13:27 +0200, mabu <mabu@sbox.tugr az.at> wrote:
    [color=blue]
    >Hi!
    >
    >I coming closer to my problem. I am using the Muenich method to group
    >my items within an element. But i was not able to write a correct
    >expression to group the elements because of the value of an
    >attribute...
    >
    >My current statement is:
    >
    > <xsl:variable name="selection "
    >select="w:p[not(preceding-sibling::w:p) or w:pPr/w:pStyle[@w:val !=
    >preceding-sibling::w:p[1]/w:pPr/w:pStyle[@w:val]]] "/>
    >[/color]
    Ok, this expression is doing its work ...

    <xsl:variable name="selection "
    select="w:p[not(preceding-sibling::w:p) or w:pPr/w:pStyle/@w:val !=
    preceding-sibling::w:p[1]/w:pPr/w:pStyle/@w:val] "/>


    mabu

    Comment

    Working...