[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

AW: The old problem of Javascript, XSL and ampersand..

Subject: AW: The old problem of Javascript, XSL and ampersand...
From: "Huditsch Roman" <Roman.Huditsch@xxxxxxxxxxxxx>
Date: Tue, 25 Jan 2005 12:34:54 +0100
javascript ampersand
I just tested Vasu's stylesheet using Saxon 8.2.
The output seems to be exactly what you expected.
But I would recommend adding additional templates
(or you could as well do that in your template="/")
for creating your basic HTML structure...

wbr,
Roman

_______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail roman.huditsch@xxxxxxxxxxxxx
www.lexisnexis.at


> -----Urspr|ngliche Nachricht-----
> Von: Vasu Chakkera [mailto:vasucv@xxxxxxxxxxx]
> Gesendet: Dienstag, 25. Januar 2005 12:13
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re:  The old problem of Javascript, XSL and ampersand...
>
> Ben,
> I dont find a problem with your code., aaprt ferom the fact
> that you have not defined the <xsl:template match = ""> so
> your ending </xsl:template> doesnt have an opening <xsl:template>.
> This would make your XSL not well-formed..so you should be
> getting an error while running the transformation.
> apart from that if you correct this , the javascript code
> must display properly.
> It works  for me with MSXML3 and MSXML 4!!
>
> pasting you back the corrected version that worked for me.
>
> <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet
> version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>  <xsl:output method="html" omit-xml-declaration="yes" standalone="no"
> indent="yes"/>
>  <xsl:template match="/">
>   <xsl:text disable-output-escaping="yes">
>
>         <![CDATA[
>
>      <script type="text/javascript"
> src="../IM/assets/dialog.js"></script>
>      <script type="text/javascript"
> src="../IM/IMEStandalone.js"></script>
>      <script type="text/javascript">
>       var manager = new ImageManager('../IM/','en');
>
>     ImageSelector =
>         {
>     update : function(params)
>          {
>             if(this.field && this.field.value != null)
>         {
>            this.field.value = params.f_file; //params.f_url
>          }
>         },
>     select: function(textfieldID)
>     {
>         this.field = document.getElementById(textfieldID);
>         manager.popManager(this);
>     }
>     };
>     </script>
>
>     ]]>
>
> </xsl:text>
>   <form action="" method="POST">
>    <div onClick="ImageSelector.select('file');">
>     <xsl:value-of
> select="."/>
>    </div>
>    <input type="text" name="file"/>
>   </form>
>  </xsl:template>
> </xsl:stylesheet>
>
>
>
>
> Vasu
>
> ----- Original Message -----
> From: "ben senior" <ben@xxxxxxxxxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Tuesday, January 25, 2005 10:54 AM
> Subject: Re:  The old problem of Javascript, XSL and ampersand...
>
>
> > My apologies. I should have included everything to begin
> with, but it
> > gets a bit unweildy.
> >
> > XSL : (I have commented out the CDATA which didn't work, and tried
> > replacing the output method with html)
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <xsl:output method="xml" omit-xml-declaration="yes" standalone="no"
> > indent="yes"/>
> > <!--
> > <xsl:text disable-output-escaping="yes">
> > <![CDATA[
> > -->
> >      <script type="text/javascript"
> src="../IM/assets/dialog.js"></script>
> >      <script type="text/javascript"
> src="../IM/IMEStandalone.js"></script>
> >      <script type="text/javascript">
> >       var manager = new ImageManager('../IM/','en');
> >
> >     ImageSelector =
> >         {
> >     update : function(params)
> >          {
> >             if(this.field && this.field.value != null)
> >         {
> >            this.field.value = params.f_file; //params.f_url
> >          }
> >         },
> >     select: function(textfieldID)
> >     {
> >         this.field = document.getElementById(textfieldID);
> >         manager.popManager(this);
> >     }
> >     };
> >     </script>
> > <!--
> > ]]>
> > </xsl:text>
> > -->
> >      <form action="" method="POST">
> >         <div onClick="ImageSelector.select('file');"><xsl:value-of
> > select="."/></div>
> >               <input type="text" name="file"/>
> >      </form>
> > </xsl:template>
> >
> > </xsl:stylesheet>
> >
> > Many thanks for your patience,
> >
> > Ben
> >
> > Vasu Chakkera wrote:
> >
> > >can you show us your xsl?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.