473,320 Members | 1,861 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,320 software developers and data experts.

Including xml in a string constant

Hi

I am trying to write out some a string constant that needs to include
a couple of XML elements. The parser is, quite rightly, complaining
about what I have done but I don't know how to solve it.

I have tried a couple of methods as follows:

<head>
<meta http-equiv="refresh"
content="0;url=logic-js.asp?action=dologon&amp;txtUsername=&lt;xsl:valu e-of
select="logicresponse/username"/&gt;&amp;txtPassword=&lt;xsl:value-of
select="logicresponse/password"/&gt;"/>
</head>

Which complains about a lack of whitespace

and also:

<xsl:variable name="content">
0;url=logic-js.asp?action=dologon&amp;txtUsername=
<xsl:value-of select="logicresponse/username"/>
&txtPassword=
<xsl:value-of select="logicresponse/password"/>
</xsl:variable>

<head>
<meta http-equiv="refresh" content="$content"/>
</head>

which, of course, just returns $content!

Any one got any idea how I can achieve what I need to do?

Thanks

Neil Thompson
Jul 20 '05 #1
1 1867
your second attempt should work if you put the $content in braces i.e.
<meta http-equiv="refresh" content="{$content}"/>

in fact you can put any xpath expression in side braces, so the first one
might work as well - e.g. {logicresponse/username}

alternatively you can use <xsl:attribute> to add the 'content' attribute to
the meta node, which is more flexible

Andy

"Neil Thompson" <ne**@williamsdb.zzn.com> wrote in message
news:db**************************@posting.google.c om...
Hi

I am trying to write out some a string constant that needs to include
a couple of XML elements. The parser is, quite rightly, complaining
about what I have done but I don't know how to solve it.

I have tried a couple of methods as follows:

<head>
<meta http-equiv="refresh"
content="0;url=logic-js.asp?action=dologon&amp;txtUsername=&lt;xsl:valu e-of select="logicresponse/username"/&gt;&amp;txtPassword=&lt;xsl:value-of
select="logicresponse/password"/&gt;"/>
</head>

Which complains about a lack of whitespace

and also:

<xsl:variable name="content">
0;url=logic-js.asp?action=dologon&amp;txtUsername=
<xsl:value-of select="logicresponse/username"/>
&txtPassword=
<xsl:value-of select="logicresponse/password"/>
</xsl:variable>

<head>
<meta http-equiv="refresh" content="$content"/>
</head>

which, of course, just returns $content!

Any one got any idea how I can achieve what I need to do?

Thanks

Neil Thompson

Jul 20 '05 #2

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

Similar topics

14
by: nospam | last post by:
From the book "There is an important difference between these definitions: char amessage="now is the time"; char *pmessage ="now is the time"; snip On the other hand, pmessage is a...
2
by: webcm123 | last post by:
I'm making some changes in files structure in my CMS. I will use more templates for modules. However, the topic of <titleand other ... came back when i was thinking about it. ---- Pre-generating...
20
by: karthikbalaguru | last post by:
Hi, String constant being modifiable in C++ but, not modifiable in C. that is, In C++, the following example output will be "Mplusplus" char *str1 = "Cplusplus"; *str1 = 'M'; In C, the above...
18
by: sinbad | last post by:
hi, why does the following program gives an runtime error ,instead of compilation error. anyone please shed some light. thanks sinbad ------------------------------ int main()
13
by: sinbad | last post by:
hi, how to concatenate a "hash defined" constant value to another "hash defined" constant string. For example #define ABC 100 #define MYSTR "The value of ABC is" Now i need a string that...
21
by: Ray Cassick | last post by:
I can't believe why I had not noticed this before and why I never asked it before... When defining a string why is it not required to use the new keyword? Like: Dim a As String = New String ...
1
by: mohanprasadgutta | last post by:
hello everyone, i have to write a program which will take a command line arguement which is nothing but a constant name. in the program i am trying to print out the value corresponding to the...
7
by: Hendrik Schober | last post by:
Hi, this #include <string> class test { typedef std::string::size_type size_type; static const size_type x = std::string::npos; }; doesn't compile using either VC9 ("expected constant...
19
by: bowlderyu | last post by:
Hello, all. If a struct contains a character strings, there are two methods to define the struct, one by character array, another by character pointer. E.g, //Program for struct includeing...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.