CDATA sections for teh win. Have mercy, it's that time of the day, but thanks. :)
On 3/27/08, Robert Koberg <[EMAIL PROTECTED]> wrote: > > On Thu, 2008-03-27 at 16:55 +0100, Christian Vest Hansen wrote: > > Hi, > > > > We're using Rhino to process some JavaScript that is hidden in an XML > > document. This means that our javascript also has to be valid XML, in > > the sense that it should not break anything but sit there and play > > plain-text until Rhino comes along. > > > > This gives us some problems with operators such as <, >, <=, >=, <<, > > >> and >>>, so we have to encode them with > and <, which is > > tedious. > > > > I wonder if there happen to be alternative alphabetic names for these > > operators that we could use instead? > > > ummm, why would that be less tedious? > > But, as others have mentioned, you can wrap your JS in CDATA. > > You could also simple use a script/@src and call in the referenced file > that contains the JS. > > Or you could write your JS in a way that does not need those characters, > rather creates objects/arguments for a controller-type JS. > > best, > -Rob > > > > > > I think I recall seeing such operators, but maybe I'm wrong since > > google couldn't find anything about them. > > > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
