473,474 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Positional Grouping

Hi
I'm having difficulties with positional grouping.
I have a wordML fragment that looks something like this:

<ns0:Body>
<w:p>
<w:pPr>
<w:pStyle w:val="BodyHeading"/>
</w:pPr>
<w:r>
<w:t>Subject Matter</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="NumberedText"/>
</w:pPr>
<w:r>
<w:t>Some list text</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="Text"/>
</w:pPr>
<w:r>
<w:t>Some text</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="BodyHeading"/>
</w:pPr>
<w:r>
<w:t>Subject Matter 2</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="Text"/>
</w:pPr>
<w:r>
<w:t>Some more text</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="NumberedText"/>
</w:pPr>
<w:r>
<w:t>Some more list text</w:t>
</w:r>
</w:p>
</ns0:Body>

I need to transform this XML into another XML Schema format which
requires paragraphs in the "Body" to be structured in this way

<Body>
<Section>
<Title>Subject Matter</Title>
<List>
<ListItem>Some list text</List>
</List>
<Para>Some text</Para>
</Section>
<Section>
<Title>Subject Matter 2</Title>
<Para>Some more text</Para>
<List>
<ListItem>Some more list text</List>
</List>
</Section>
</Body>

I have no control over the number of paragraphs that the Body will
contain and I think I need to use the w:pStyle attribute to identify
which paragraphs need to become Section headings. As you can see all
the paragraphs after a BodyHeading paragraph need to be children of the
BodyHeading paragraph (which becomes a <Section>) until another
BodyHeading is found at which time the process starts again.

I am using XSL version 1.0 and am in big trouble.
Can anyone help.

Jan 10 '07 #1
0 1104

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

Similar topics

3
by: Tomi Silander | last post by:
Hi, this must have been asked 1000 times (or nobody is as stupid as me), but since I could not find the answer, here is the question. My program mitvit.py: -------------- import optparse...
1
by: amber | last post by:
Hello, I have a report in VB.NET/Crystal Reports. I have a criteria form that users select between 2 different types of grouping (group by category or group by year). Can I programmatically...
2
by: Andreas Håkansson | last post by:
Seeing how my previous post seem to have fallen between the cracks, I thought I would have a second, more direct, go at it. So my question is "Is it possible to group (Muenchian method) over...
0
by: billb | last post by:
How do I get a positional flatfile from cobol (shown below) and create a Schema based on the positions below in vb.net? 'ERROR-TYPE-CDE Positional length =(2) 'ERROR-NUM ...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
1
by: billb | last post by:
Hi all, I'm using 2005 VB.NET to create a web service that validates an xsd and xml file but need to get the positional flatfile into an xsd format. Has anyone tried this before or know of some...
3
by: ROMANLP | last post by:
I am trying to export a table to a text file. The problem I am having is that by putting it into .txt I lose my positional holders. i.e. The field size for field A is set to 8. User enters 1234...
0
by: Roman Bertle | last post by:
Hello, I try to format monetary values using the locale module, python2.5: Python 2.5.2a0 (r251:54863, Jan 3 2008, 17:59:56) on linux2 Type "help", "copyright", "credits" or "license" for...
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...
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.