473,472 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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="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

Jul 20 '05 #1
1 1452
On Fri, 11 Jul 2003 17:13:27 +0200, mabu <ma**@sbox.tugraz.at> 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

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Huebsch | last post by:
Hello, I have a Real-World-XSLT-Problem.(tm) That is: A XML-Document of about 75.000 elements contains <person>-elements at various depths of the tree. Each person consists of a <name>,...
3
by: Tapas | last post by:
Hi, Generating a .cs file using CodeDom. It generates the class fine. But i have few queries about class generation. 1. How to create a protected member? By default it generates a private...
1
by: Good Enchiladas | last post by:
Is it possible to determine a method's own attributes from within the method without hardcoding the name of the method as a constant within the method? Please tell me if it is possible and how it...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
3
by: Koen | last post by:
Hi, I have been reading a bit basic stuff about method attributes in C#, and I wanted to build the following functionality with it: if a method has the custom attribute <LogException> the...
23
by: digitalorganics | last post by:
How can an object replace itself using its own method? See the following code: class Mixin: def mixin(object, *classes): NewClass = type('Mixin', (object.__class__,) + classes, {}) newobj =...
3
by: AWasilenko | last post by:
I'm still in the process of learning python via a handful of books I bought. One book I am reading just introduced Base Class Methods. I found that I needed more understanding on this concept and...
1
by: java4life | last post by:
Java problem -------------------------------------------------------------------------------- I need to generate the following output with a TestProgram. Lecturer 65374 has 3 students:...
5
by: vaibhav03 | last post by:
Hello All, I have made an AJAX call and bringing back some data from the server and then That data would be converted to XML through javascript. Now i am creating various elements like TABLE, TR,...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.