Muench method on attributes problem

M

mabu

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
 
M

mabu

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top