472,805 Members | 1,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

XALAN and & in links


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
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?


Jul 20 '05 #1
0 2332

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

Similar topics

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...
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...
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...
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...
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...
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:...
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...
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...
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...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...

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.