473,811 Members | 2,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Info On Transforming This Xml

1 New Member
<LineItem>pedia tric information <NumberedList > <NumberedListIt em>dgc</NumberedListIte m> <NumberedListIt em>djb</NumberedListIte m> <NumberedListIt em>jbv</NumberedListIte m> <NumberedListIt em>fnjfvh</NumberedListIte m> </NumberedList>
</LineItem>
<LineItem>Adu lt Information <NumberedList > <NumberedListIt em>rtgrggg</NumberedListIte m> <NumberedListIt em>\rjgb</NumberedListIte m> <NumberedListIt em>fgjbfb</NumberedListIte m> <NumberedListIt em>g dfnn</NumberedListIte m> <NumberedListIt em>nkbfbv</NumberedListIte m> </NumberedList>
</LineItem>

I am using this xslt code to get a contiguously numbered items and a line item in between the list.

<xsl:for-each select="LineIte m">
<xsl:value-of select="." />
<xsl:for-each select="Numbere dList">
<ol>
<xsl:attribut e name="start"><x sl:value-of select="countpr eceding::Number edListItem) + 1"/></xsl:attribute>
<xsl:for-each select="Numbere dListItem"> <li> <xsl:call-template name="FormatNum beredList"/> <xsl:apply-templates/> </li> </xsl:for-each> </ol> </xsl:for-each> </xsl:for-each>

This xslt is picking up the data inside the numbered list item also along with the values inside the line item tag. How do get rid of the data from numberedListIte m and only get Pediatric Information and Adult Information in the line item and the rest of the data in the form of numbered list
Jul 26 '07 #1
1 1171
jkmyoung
2,057 Recognized Expert Top Contributor
Change 2nd line: <xsl:value-of select="." />
to <xsl:value-of select="text()" />

Only gets text children as opposed to grandchildren, etc..
Jul 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2182
by: Jody Greening | last post by:
Transforming with XSLT, Grouping elements until difference found. I am seeking some help with the following problem, I am fairly new at XSLT transformations, and my problem may lie in looking at it from a traditional programming point of view. I have did quite a bit of searching but have found no answers to my particular problem... please read below XML for the problem I am having.
5
1786
by: Daniel Crespo | last post by:
Is there a built-in method for transforming (1,None,"Hello!") to 1,None,"Hello!"? Thanks
3
4879
by: Sergio Otoya | last post by:
Hi all, I need to transform an xml document, using xsl to a HTML output. I can do this successfully using the XslTransform class as below: Dim oTrans As New XslTransform oTrans.Load(sXSLPath) oTrans.Transform(sXMLPath, "c:\trans.htm")
5
4506
by: Jiho Han | last post by:
I do a transform of an xml document into another xml using XslTransform. In my xsl file, I specify using <xsl:output encoding="utf-8"/>. However, when my transform is done, the resulting xml is in utf-16. What gives? Anyone?
4
2029
by: Cathie | last post by:
Hi All, I am trying to get my style sheet to work. It works fine in IE but I can't get it to work in .net. Below is the function I use for transforming, where advancedOptionsFile is the path to the file containing an XML document required by the transformation, and xmlSimplified is the XML document to trasform. ---------------------------------------------------------------------------- -------------------------------
3
1975
by: Jens Jensen | last post by:
Hello, I need to generate a flat text file where aeach is made up os fields and space. To automate the process, i want to define an xml file that describe the file form mate in term of <Lines> <Line1>
2
3351
by: Joseph Kesselman | last post by:
Since the recent "Docbook on Windows" question brought this up... I did a bit of checking on the current status of these schemas, what they're intended for and how they interrelate. IBM's Robert Weir reports that there have been "some discussions in OASIS, between the ODF, DocBook and DITA TC's to come up with a positioning and interop story involving these three standards, with the intent of giving a demo at an OASIS symposium next...
6
1704
by: StephQ | last post by:
I need to implement an algorithm that takes as input a container and write some output in another container. The containers involved are usually vectors, but I would like not to rule out the possibility of using lists. The problem is that I need two versions of it, depending if I'm adding the generated (by the algorithm) values to the target container or if I just modify pre-existing values of the target container. Efficiency is important...
1
2065
by: scmorgan | last post by:
Hi All, I am trying to come up with a solution for transforming a complex type ie xml ... <document> <label> This is a <highlight> string</highlight> </label>
1
2107
by: javabeginner123 | last post by:
i have a java prob, and i have to solve it fast, but i'm just getting to know it, so plz help me solve it with full code completed, thanks so much. the prob is to create a monter fight and there is the description: The monsters are of a very strange kind, called "Bigmon". They have some basic characteristics, like attack and defense power, life points, a name, and a bonus factor that is used in special occasions. In this initial phase of the...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7670
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
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 we have to send another system
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.