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

Home Posts Topics Members FAQ

Basix question on a string, (I beleive)

I have the following XML file:
--------------
<?xml version="1.0" encoding="ISO-8859-1" ?>

<?xml-stylesheet type="text/xsl" href="sample2.xslt"?>

<Employees>

<Employee>

<Name>Lieder</Name>

<Age>4</Age>

<Greeting>Awooo!</Greeting>

</Employee>

<Employee>

<Name>Lieder2</Name>

<Age>3</Age>

<Greeting>Awooo too!</Greeting>

</Employee>

</Employees>

------------------

and the following xslt file:

--------

<?xml version="1.0" encoding="ISO-8859-1" ?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microsoft.com/intellisense/ie5" >

<xsl:template match="/">

<xsl:apply-templates select="TopInformation" />

<xsl:for-each select="Employees/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="Greeting" /><br/>

</xsl:for-each>
</xsl:template>

<xsl:template match="TopInformation">

<xsl:value-of select="<SomeString />"

</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="sequential" fadetime="2" looping="yes" xpos="0"
ypos="0">

How do I do that?

TIA,

Paolo


Nov 12 '05 #1
7 1248
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="sequential" 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="sequential" fadetime="2" looping="yes"
xpos="0" ypos="0">

<xsl:apply-templates select="TopInformation" />

<xsl:for-each select="Employees/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="Greeting" /><br/>

</xsl:for-each>

</gallery>

</xsl:template>

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2
I still get an error when I write this:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microsoft.com/intellisense/ie5" >

<xsl:template match="/">

<gallery timer="3" order="sequential" fadetime="2" looping="yes"

xpos="0" ypos="0">

<xsl:apply-templates select="TopInformation" />

<xsl:for-each select="Employees/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="Greeting" /><br/>

</xsl:for-each>

</gallery>

</xsl:template>

------------------

What am I doing wrong?

TIA,

Paolo

"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message
news:Ob*************@TK2MSFTNGP10.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="sequential" 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="sequential" fadetime="2" looping="yes"
xpos="0" ypos="0">

<xsl:apply-templates select="TopInformation" />

<xsl:for-each select="Employees/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="Greeting" /><br/>

</xsl:for-each>

</gallery>

</xsl:template>

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com

Nov 12 '05 #3
Paolo Pignatelli wrote:
I still get an error when I write this:


What kind of error?

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #4
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!PLEASEtkachenko.com> wrote in message
news:eA**************@TK2MSFTNGP15.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

Nov 12 '05 #5
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
Nov 12 '05 #6
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:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microsoft.com/intellisense/ie5" >

<xsl:template match="/">

<p> woof

</p>

<xsl:for-each select="Employees/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="Greeting" /><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!PLEASEtkachenko.com> wrote in message
news:Om**************@TK2MSFTNGP10.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

Nov 12 '05 #7
I got it...

<xsl:template match="/">

<![CDATA[

<gallery timer="3" order="sequential" fadetime="2" looping="yes"

xpos="0" ypos="0">

]]>

<p></p>

<xsl:for-each select="Employees/Employee">

Thanks.

Merry Christmas,

Paolo

"Paolo Pignatelli" <Pa***@DotNetStore.com> wrote in message
news:eN**************@TK2MSFTNGP11.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:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microsoft.com/intellisense/ie5" >

<xsl:template match="/">

<p> woof

</p>

<xsl:for-each select="Employees/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="Greeting" /><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!PLEASEtkachenko.com> wrote in message
news:Om**************@TK2MSFTNGP10.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


Nov 12 '05 #8

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

Similar topics

3
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...
9
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...
5
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 :...
3
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...
6
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...
3
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...
1
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...
12
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...
15
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?
7
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 -...
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
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
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...
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
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 ...
0
muto222
php
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.