Muench method on attributes problem

Discussion in 'XML' started by mabu, Jul 11, 2003.

  1. mabu

    mabu Guest

    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="ParagraphText"/>
    </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, Jul 11, 2003
    #1
    1. Advertising

  2. mabu

    mabu Guest

    On Fri, 11 Jul 2003 17:13:27 +0200, mabu <> wrote:

    >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]]] "/>
    >

    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
     
    mabu, Jul 11, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Huebsch

    [xsl] speed up tripple-muench

    Chris Huebsch, Apr 12, 2004, in forum: XML
    Replies:
    0
    Views:
    455
    Chris Huebsch
    Apr 12, 2004
  2. Max
    Replies:
    1
    Views:
    499
    Joe Kesselman
    Sep 22, 2006
  3. P4trykx
    Replies:
    2
    Views:
    1,849
    bruce barker
    Jan 31, 2007
  4. james_027

    class attributes & data attributes

    james_027, Jun 20, 2007, in forum: Python
    Replies:
    2
    Views:
    386
    Bruno Desthuilliers
    Jun 20, 2007
  5. Jayden
    Replies:
    16
    Views:
    541
    Steven D'Aprano
    Sep 29, 2012
Loading...

Share This Page