You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by MAHE Vincent FTRD/DIH/REN <vi...@rd.francetelecom.fr> on 2000/07/26 17:46:01 UTC
external entity containing non-XML javascript code
I try to call my Javascript functions inmy XML file via external non-XML
entities.
So, I put between <!CDATA[ ]]> my Javascript code so that it is not analyzed
by the Xalan XML parser.
But when I launch the parsing process with Xalan, It generates an error
message :
'the reference to the entity "newrep" must end with a ; delimiter'
What can I do to solve that ? I don't understand why the Xalan parser is
still analyzing my <!CDATA[ ...]]> javascript code !
Here is my xml code :
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE page_web SYSTEM 'page.dtd' [
<!ENTITY valider "<![CDATA[
function valider()
{
newrep=document.forms.creerrep.url.value;
parent.parent.frame_gauche.mode='gest_fich';
location.replace('/servlets/ftp_creer_rep?command=creerrep&newrep='+newrep+'
&site=[JSERV.NOM_SITE]&repcur=[JSERV.PATH_REEL]');
}
]]>">
]>
<page_web>
<title>Mon Site</title>
<script>
&valider;
</script>
</page_web>
Vincent Mahé.
e-mail : vincent.mahe@francetelecom.fr