Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > VERY simple question about Javascript in XSL. One line!

Reply
Thread Tools

VERY simple question about Javascript in XSL. One line!

 
 
Gene Ellis
Guest
Posts: n/a
 
      06-23-2004
Put simple I would like to have this line in my XSL template:

document.writeln("<a href='http://www.mydomain.com/user/login.php'
class='login'>")

My XML parser seems to be breaking on the single quotes. Do you know
how I can use double quotes? Or even single quotes? I have tried using
a backslash, and even tried using their numeric and character values.
I am really unsure of how to use these things together in the correct
way. Thank you so much!
 
Reply With Quote
 
 
 
 
Philippe Poulard
Guest
Posts: n/a
 
      06-23-2004
Gene Ellis wrote:
> Put simple I would like to have this line in my XSL template:
>
> document.writeln("<a href='http://www.mydomain.com/user/login.php'
> class='login'>")
>
> My XML parser seems to be breaking on the single quotes. Do you know
> how I can use double quotes? Or even single quotes? I have tried using
> a backslash, and even tried using their numeric and character values.
> I am really unsure of how to use these things together in the correct
> way. Thank you so much!


escape " with &quot;
escape ' with &apos;
escape < with &lt;
escape > with &gt;
escape & with &amp;

--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
 
Reply With Quote
 
 
 
 
Patrick TJ McPhee
Guest
Posts: n/a
 
      06-25-2004
In article <(E-Mail Removed) >,
Gene Ellis <(E-Mail Removed)> wrote:

% Put simple I would like to have this line in my XSL template:
%
% document.writeln("<a href='http://www.mydomain.com/user/login.php'
% class='login'>")

Well, what have you tried? It's difficult to make suggestions without
any context at all.


% My XML parser seems to be breaking on the single quotes.

It seems to be, but it's probably breaking on <. In this case,
the anchor tag is data, not an XML element, so you need to
treat it as data. You could try
<![CDATA[document.writeln("<a href='http://www.mydomain.com/user/login.php'
class='login'>")]]>

If that doesn't help, post a short example of what you're trying now.
--

Patrick TJ McPhee
East York Canada
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help running a very very very simple code olivier.melcher Java 8 05-12-2008 07:51 PM
CGI.PM Very very simple question AMT2K5 Perl Misc 3 12-02-2005 05:18 PM
Very very very basic question Peter C Programming 14 02-14-2005 09:46 AM
Quick Book file access very very very slow Thomas Reed Computer Support 7 04-09-2004 08:09 PM
very Very VERY dumb Question About The new Set( ) 's Raymond Arthur St. Marie II of III Python 4 07-27-2003 12:09 AM



Advertisments