473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XSL stuff

Hi....

I have a sample xml that looks something like this:

<manifest>
<config>
<type>Processor Type
<options>
<option>ARM</option>
<option>Pentium</option>
<option>Alpha</option>
<option>Motorola</option>
</options>
</type>
</config>
</machine>

I need an XSL transformation that will be able to give me
just the value "Processor Type". But when I run the
following XSL, it gives me all the values of the nodes
within the <type> tag.

How can I just get the value of the <type> tag only?

XSL:

<xsl:for-each select="/manifest/config">
<xsl:value-of select="type" />
</xsl:for-each>
Nov 12 '05 #1
1 1020
Eric D. wrote:
I have a sample xml that looks something like this:

<manifest>
<config>
<type>Processor Type
<options>
<option>ARM</option>
<option>Pentium</option>
<option>Alpha</option>
<option>Motorola</option>
</options>
</type>
</config>
</machine>

I need an XSL transformation that will be able to give me
just the value "Processor Type". But when I run the
following XSL, it gives me all the values of the nodes
within the <type> tag.

How can I just get the value of the <type> tag only?


<xsl:value-of select="type/text()" />

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

2
by: Jeff Lambert | last post by:
I have this function everywhere in our SQL server 2000 stored procedures. Has anyone written a workaround function for it? I would appreciate if you could share. As you can imagine, searching the...
6
by: lkrubner | last post by:
Me and some friends are working on some PHP based templates for web pages. We've templates that look like this (simplified): <html> <head> <title> The green and blue design for carpentry...
72
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
2
by: Little PussyCat | last post by:
Hello, I need to be able to replace only the first occurance of a space character in a column. Reason being is the data in the column I am trying to replace seems to have umpteen space...
1
by: themf | last post by:
Hi, I'm trying to make a page that will become a part of another page, ie. included in the HTML at a particular point. How do I do this so all the stuff inside MY page remains intact, relative...
0
by: Jonathan Wilson | last post by:
Firstly, to get msvcrt.lib, install the .NET framework SDK. The version of msvcrt.lib included there is the exact same one as comes with Visual Studio ..NET 2003. There are some other things that...
7
by: +The_Taco+ | last post by:
Ok i'm kinda new to ASP.NET. I got like 4 aspx pages right now, all with there aspx.vb codebehind. Each of them need to connect on the same database, so what I want to do is to create a module or a...
9
by: collection60 | last post by:
I've been developing some Unix based shell tools. They work fine on Linux and MacOSX. I want to compile them on Win32. But I can't get hash_map to compile. I tried downloading stl (and...
5
by: Obinna | last post by:
Well I wrote this code that saved a Serialized ArrayList to disk in VB.NET and tried to read it in with another one in C#. Got some funny exception about my Assembly (can't rember exactly), what's...
20
by: Jimmy | last post by:
Hi to all python now has grown to a versatile language that can accomplish tasks for many different purposes. However, AFAIK, little is known about its ability of kernel coding. So I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.