473,405 Members | 2,287 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,405 software developers and data experts.

xalan xslt transform

i have a question. the only thing i have not until this point done is
trace this in the source. here is what i would like to do; i wish to
perform a transform, however the following snippet is not properly
transformed:

<xsl:template match="/">
<script language="JavaScript" type="text/javascript">
<xsl:text>
<![CDATA[
function reset(elem1, elem2) {
elem1.value = "";
elem2.value = "";
}

the output of this stops after 'elem1.value=""', which is to say the
semicolon breaks the transform

the XML file includes the following:

<form ... onsubmit="return validateForm(event, this);">

i am processing this as;

<xsl:attribute name="onsubmit"><xsl:value-of select="/form/@onsubmit"/
></xsl:attribute>
once again, it breaks after the semicolon.

my question is, why?

Aug 9 '07 #1
3 1964
ga*****@gmail.com wrote:
the output of this stops after 'elem1.value=""', which is to say the
semicolon breaks the transform
Extremely unlikely; semicolon has no special meaning in XML. This sounds
more like a SAX processing problem, frankly; there's a classic
programming error wherein folks forget that SAX may break up text across
multiple calls to characters().

The fragment you gave us is obviously incomplete (it doesn't even close
the CDATA section, never mind the elements), and you didn't show us the
stylesheet, which makes diagnosis next to impossible. If you want
assistance, post a more complete example -- preferably one which other
folks can run to reproduce the problem.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Aug 9 '07 #2
On Aug 8, 11:59 pm, Joe Kesselman <keshlam-nos...@comcast.netwrote:
gaid...@gmail.com wrote:
the output of this stops after 'elem1.value=""', which is to say the
semicolon breaks the transform

Extremely unlikely; semicolon has no special meaning in XML. This sounds
more like a SAX processing problem, frankly; there's a classic
programming error wherein folks forget that SAX may break up text across
multiple calls to characters().

The fragment you gave us is obviously incomplete (it doesn't even close
the CDATA section, never mind the elements), and you didn't show us the
stylesheet, which makes diagnosis next to impossible. If you want
assistance, post a more complete example -- preferably one which other
folks can run to reproduce the problem.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
thanks for your reply. i did what i should have done earlier and wrote
a test harness for this and determined the problem is elsewhere; when
the xsl and xml files are processed through my test harness the output
is what i expect.

Aug 11 '07 #3
ga*****@gmail.com wrote:
a test harness for this and determined the problem is elsewhere
That's a large part of why I keep asking for complete (reduced)
testcases that demonstrate a problem -- often the process of trimming
the problem down is enough to expose the point of confusion.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Aug 11 '07 #4

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

Similar topics

0
by: Michael Alers | last post by:
Hi, I have the problem switching off the "loading of external DTD" feature while transforming xml/xslt with XALAN. The used xml-parser is XERCES. I know how to switch off this feature when only...
1
by: hongping | last post by:
I am having problems transforming a xml doc into html with proper indenting. Here is the xslt <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0"...
1
by: Hyunchan Kim | last post by:
To indent xml file, I made an instance of Transformer from Templates using following. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
0
by: bastien | last post by:
Hi all I get an xml file which refer to a xsl file . this xsl refer to others xsl files. I use xalan to do the transformation xml+xsl=>html but we I launch xalan *I get an error: ...
1
by: Fisch von Gestern | last post by:
I have tried to run the extension function/element examples provided with the Xalan-J download. I believe that my classpath is correct, and that my versions are up-to-date. However, I can't get...
7
by: Ganesh Gella | last post by:
Hi All, I am planning to use Xalan to transform XML data by applying xls stylesheets. Here tricky part is, Xalan provides several C++ APIs, which are very much useful if our requirement is...
1
by: pgreaves | last post by:
hi there i have developed a style sheet that works fine in the XML perspective of Rational Software architect, but when i add it to my application, it appears to match no nodes. my XSL that...
7
by: RC | last post by:
First, let me say I couldn't find a group discuss XML/XSLT. So I only choose the closest groups to post this message. Here is part of my *.xsl file <xsl:stylesheet...
1
by: Papastefanos Serafeim | last post by:
I want to use the <xsl:document> XSLT command with xalan, but I get the following error message -------- XSLT Error (javax.xml.transform.TransformerConfigurationException):...
3
by: Petterson Mikael | last post by:
Hi, I was running the following in Netbeans 5.5: sing com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl - default JRE XSLT processor. Creating output/NcmiSigTest.java Unsupported...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.