473,507 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XALAN and & in links

Hi,

I runned in trouble using XALAN for XSL-Transformation.
The following snipplet show what I mean:
[...]
<a href="http://blah.com/?test=test&amp;test2=test2">Test1&amp;</a>
<a href="http://blah.com/?test=test&amp;amp;test2=test2">Test2&amp;amp;</a>
[...]

This results in the following HTML Code:
[...]
<a href="http://blah.com/?test=test&test2=test2">Test1&amp;</a>
<a href="http://blah.com/?test=test&amp;test2=test2">Test2&amp;amp;</a>
[...]

As you see XALAN is acting different on wether the "&amp" is inside a
link, or just final text. Notice that in first href &amp; is transformed
to & while the link text element contains the proper &amp; as in the
xsl. The second link is just to show the otherway around - more or less.
I'm using XALAN 2.6 for Java and this is my output definition.

<xsl:output method="html" indent="yes" encoding="UTF-8"
media-type="text/html" doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />

Is XALAN acting conform to the standard? I just found on
http://www.w3.org/TR/1999/REC-xslt-1...-Output-Method
that it should keep the "&amp;" for html output, which it does only for
the link text, but not the href attribute.

My Problem: I put correct links in and the result is not HTML conform,
while the &-sign is not correctly masked. Is that the standard behaviour
with all XSLT processors? If so, what is an easy workaround for that issue?

Cheers

Thomas
Jul 20 '05 #1
0 2407

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

Similar topics

9
8525
by: Collin VanDyck | last post by:
I have a basic understanding of this, so forgive me if I am overly simplistic in my explanation of my problem.. I am trying to get a Java/Xalan transform to pass through a numeric character...
1
2727
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2...
4
3203
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
3
2542
by: shaun roe | last post by:
a follow up with new problems from my previous post: I have xml encoded in a string with elements like &lt;myElement/&gt; e.g <codeFragment> &lt;myElement&gt;some text&lt;/myElement&gt; </codeFragment> I...
0
1156
by: geoffblanduk_nospam | last post by:
I'm running Xalan-C++ 1.10 under Solaris. I'm using the binary iamge downloaded from the Xalan-C website. I've built my library using Forte 6.2. This builds into a library that is then called by...
0
1241
by: krishna.voleti | last post by:
Upgrading Xalan from 1.7 to 1.9 and Xerces from 2.4 to 2.7 on HP-UX 11i. I am using aCC: HP ANSI C++ B3910B A.03.63. Getting the following error during compilation. /usr/ccs/bin/ld:...
10
6016
by: Bilal | last post by:
Hello, I'm trying to perform some string manipulations in my stylesheet and have gotten stuck on the issue below so hopefully can elicit some useful hints. Namely, the problem is that I need to...
2
2059
by: MV84 | last post by:
Does anyone know how to use the Xalan-C API to get data from an XML file using an XPath. I know the SimpleXPathCAPI inputs an XPath, but it only returns true and false - I want it to return the...
2
2809
by: alex masselot | last post by:
Hello I'm not familiar with xerces in c++ Currently, we parse xml file with perl (typically XML::Twig) and java (dom4j). With both API, there is a very comfortable way to mix Sax/DOM, by...
0
7110
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...
1
7030
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
7482
tracyyun
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...
0
5623
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
5041
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
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 ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
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...

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.