I have the following XML file:
--------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="sample2.x slt"?>
<Employees>
<Employee>
<Name>Lieder</Name>
<Age>4</Age>
<Greeting>Awooo !</Greeting>
</Employee>
<Employee>
<Name>Lieder2 </Name>
<Age>3</Age>
<Greeting>Awo oo too!</Greeting>
</Employee>
</Employees>
------------------
and the following xslt file:
--------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microso ft.com/intellisense/ie5" >
<xsl:template match="/">
<xsl:apply-templates select="TopInfo rmation" />
<xsl:for-each select="Employe es/Employee">
<b>Name of Employee (2) : </b><xsl:value-of select="Name" /><br/>
<b>Age:</b><xsl:value-of select="Age" /><br/>
<b> My greeting is: </b><xsl:value-of select="Greetin g" /><br/>
</xsl:for-each>
</xsl:template>
<xsl:template match="TopInfor mation">
<xsl:value-of select="<SomeSt ring />"
</xsl:template>
</xsl:stylesheet>
---------
It seems to work. Now, I would like the top of the resultant fileto have
the following line:
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes" xpos="0"
ypos="0">
How do I do that?
TIA,
Paolo 7 1259
Paolo Pignatelli wrote: It seems to work. Now, I would like the top of the resultant fileto have the following line:
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes" xpos="0" ypos="0">
How do I do that?
Just write it in your stylesheet at the top level:
<xsl:template match="/">
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes"
xpos="0" ypos="0">
<xsl:apply-templates select="TopInfo rmation" />
<xsl:for-each select="Employe es/Employee">
<b>Name of Employee (2) : </b><xsl:value-of select="Name" /><br/>
<b>Age:</b><xsl:value-of select="Age" /><br/>
<b> My greeting is: </b><xsl:value-of select="Greetin g" /><br/>
</xsl:for-each>
</gallery>
</xsl:template>
--
Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
I still get an error when I write this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microso ft.com/intellisense/ie5" >
<xsl:template match="/">
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes"
xpos="0" ypos="0">
<xsl:apply-templates select="TopInfo rmation" />
<xsl:for-each select="Employe es/Employee">
<b>Name of Employee (2) : </b><xsl:value-of select="Name" /><br/>
<b>Age:</b><xsl:value-of select="Age" /><br/>
<b> My greeting is: </b><xsl:value-of select="Greetin g" /><br/>
</xsl:for-each>
</gallery>
</xsl:template>
------------------
What am I doing wrong?
TIA,
Paolo
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!P LEASEtkachenko. com> wrote in message
news:Ob******** *****@TK2MSFTNG P10.phx.gbl... Paolo Pignatelli wrote:
It seems to work. Now, I would like the top of the resultant fileto
have the following line:
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes"
xpos="0" ypos="0">
How do I do that?
Just write it in your stylesheet at the top level:
<xsl:template match="/">
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes" xpos="0" ypos="0">
<xsl:apply-templates select="TopInfo rmation" />
<xsl:for-each select="Employe es/Employee">
<b>Name of Employee (2) : </b><xsl:value-of select="Name" /><br/>
<b>Age:</b><xsl:value-of select="Age" /><br/>
<b> My greeting is: </b><xsl:value-of select="Greetin g" /><br/>
</xsl:for-each>
</gallery>
</xsl:template>
-- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
Paolo Pignatelli wrote: I still get an error when I write this:
What kind of error?
--
Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
Hi, and thanks.
Firstly, I get a squiggly line under "gallery" when editing in Visual
Studio.net. then when I try to view, I just get :
Name of Employee (2) : Lieder1
Age:4
My greeting is: Awooo!
Name of Employee (2) : Lieder2
Age:3
My greeting is: Awooo too!
-------------
from the XML cited. I tried so many variations, that I thought that it was
an error, but it just does not appear. (Lieder is the name of my dog.)
Thanks, and woof,
Paolo
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!P LEASEtkachenko. com> wrote in message
news:eA******** ******@TK2MSFTN GP15.phx.gbl... Paolo Pignatelli wrote: I still get an error when I write this:
What kind of error?
-- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
Paolo Pignatelli wrote: Firstly, I get a squiggly line under "gallery" when editing in Visual Studio.net. then when I try to view, I just get :
Name of Employee (2) : Lieder1 Age:4 My greeting is: Awooo! Name of Employee (2) : Lieder2 Age:3 My greeting is: Awooo too! ------------- from the XML cited. I tried so many variations, that I thought that it was an error, but it just does not appear. (Lieder is the name of my dog.)
Ooops, sorry, I have no idea what do you expect it to be. I've never
heard of <gallery> tag in HTML.
--
Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
No, it is not a tag, it is a simple string that I want to put in there. For
e.g, this works:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microso ft.com/intellisense/ie5" >
<xsl:template match="/">
<p> woof
</p>
<xsl:for-each select="Employe es/Employee">
Name of Employee (2) :<xsl:value-of select="Name" /><br/>
Age:<xsl:value-of select="Age" /><br/>
My greeting is: <xsl:value-of select="Greetin g" /><br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
--------------
But how do I substitute "woof" between the <p></p> with the string that
looks like a tag? Is there an escape chartacter ...?
TIA,
Paolo
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!P LEASEtkachenko. com> wrote in message
news:Om******** ******@TK2MSFTN GP10.phx.gbl... Paolo Pignatelli wrote:
Firstly, I get a squiggly line under "gallery" when editing in Visual Studio.net. then when I try to view, I just get :
Name of Employee (2) : Lieder1 Age:4 My greeting is: Awooo! Name of Employee (2) : Lieder2 Age:3 My greeting is: Awooo too! ------------- from the XML cited. I tried so many variations, that I thought that it
was an error, but it just does not appear. (Lieder is the name of my dog.)
Ooops, sorry, I have no idea what do you expect it to be. I've never heard of <gallery> tag in HTML.
-- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
I got it...
<xsl:template match="/">
<![CDATA[
<gallery timer="3" order="sequenti al" fadetime="2" looping="yes"
xpos="0" ypos="0">
]]>
<p></p>
<xsl:for-each select="Employe es/Employee">
Thanks.
Merry Christmas,
Paolo
"Paolo Pignatelli" <Pa***@DotNetSt ore.com> wrote in message
news:eN******** ******@TK2MSFTN GP11.phx.gbl... No, it is not a tag, it is a simple string that I want to put in there.
For e.g, this works:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" xmlns="http://schemas.microso ft.com/intellisense/ie5" >
<xsl:template match="/">
<p> woof
</p>
<xsl:for-each select="Employe es/Employee">
Name of Employee (2) :<xsl:value-of select="Name" /><br/>
Age:<xsl:value-of select="Age" /><br/>
My greeting is: <xsl:value-of select="Greetin g" /><br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
--------------
But how do I substitute "woof" between the <p></p> with the string that looks like a tag? Is there an escape chartacter ...? TIA, Paolo
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!P LEASEtkachenko. com> wrote in message news:Om******** ******@TK2MSFTN GP10.phx.gbl... Paolo Pignatelli wrote:
Firstly, I get a squiggly line under "gallery" when editing in Visual Studio.net. then when I try to view, I just get :
Name of Employee (2) : Lieder1 Age:4 My greeting is: Awooo! Name of Employee (2) : Lieder2 Age:3 My greeting is: Awooo too! ------------- from the XML cited. I tried so many variations, that I thought that
it was an error, but it just does not appear. (Lieder is the name of my
dog.) Ooops, sorry, I have no idea what do you expect it to be. I've never heard of <gallery> tag in HTML.
-- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kuywan |
last post by:
I have a Data General server with Basix Program and i would like change for
the Sco Unix server. I would like use my Basix Program on Sco Unix, but i
can't find the program for run Basix on Sco Unix (or Linux, or any Unix).
Thank you for help!.
|
by: Mikael S. H. |
last post by:
I there a function in the string class to replace an 'a' with an 'm', or
something similar?
Will I have to write a function iterating over every character in the
string to rot-13 encoding a string?
--
MikaelSh
|
by: krbyxtrm |
last post by:
Any knows of a Function Signature string Parser?
typically one that can parse string:
"unsigned int const * __cdecl MyFunction(int,void const *)"
into:
0 : 'unsigned int const *'
1 : '__cdecl'
2 : 'MyFunction'
|
by: Bob Simoneau |
last post by:
I have a function call to a C DLL which takes a string as a parameter, and
modified the string. I keep getting the following error. I beleive I have
to marshal the string, but I am unsure how to do that.
Error;
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
|
by: tommaso.gastaldi |
last post by:
Hi,
does anybody know a speedy analog of IsNumeric() to check for
strings/chars. I would like to check if an Object can be treated as a
string before using a Cstr(), clearly avoiding the time and resource
consuming Try... Catch, which in iterative processing is totally
unacceptable.
-tom
| |
by: dean.elwood |
last post by:
Hi guys,
My first post here and I'm a pascal coder doing his best to move to
C/C++ so please go easy on me ;)
I'm using the MySQL C API to pull some values from a DB. One of the
fields is a float value, but I can't seem to cast this field to a float
variable correctly:-
if(mysql_exec_sql(&mysql,query)==0) /*success*/
|
by: dotnetnoob |
last post by:
hello, i have a arraylist
/box
/box/boxTest
/vbox/vboxTest
/vbox
is it possible to process each item in the arraylist as string and if first
encounter "/" then get the value for example box and process that item and
move on to the next item in the arraylist and if it encounter box and the
|
by: Merk |
last post by:
What are some alternatives to using .ToUpper() to perform case insensitive
string comparisons?
The reason I'm asking is that I'm comparing strings in a long loop, looking
for equality; and I want for this loop to run as fast as possible. So I'm
looking for a method that would be faster than .ToUpper().
Thanks!
|
by: =?Utf-8?B?cm9nZXJfMjc=?= |
last post by:
hey, I have a datatable here, but I need to make it into a string array. how
do I do that?
|
by: david |
last post by:
I have searched existing posts and have not found an answer to this
variation of an old question. I have the following string stored in a
variable
Dim str as String = "If 9000 < 10200 Then (6 - 5 ) * (10200 - 9000)
else 0 End If"
How do I evaluate/execute the string as code and return the answer, in
this case: 1200?
|
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,...
| |
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...
|
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...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |