|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Forcing lowercase <script>Using the new Google weboptimizer tool (for multi-variate testing) requires that a certain chunk of their Javascript be encased in lowercase <script> and </script>.
I am dynamically populating the chunk of Javascript (between the <script> tags), but the resulting HTML output always ends up with uppercase <SCRIPT>, since the <script> in my html template also contains a directive, e.g. <script class="Dir::Get_Data.WebTemplate.HeadBegin"></script>
I was thinking that an xmlc compile option could force all html tags to lowercase, but could not find one.
I am using latest Barracuda (2.1) – any help appreciated.
Thanks Paul
-- Barracuda mailing list Barracuda@... http://www.objectweb.org/wws/lists/projects/barracuda |
|
|
Re: Forcing lowercase <script>With XMLC 2.2.xx, your only option is to use the XHTML DOM. The HTML DOM stores element names in upper-case and the formatting logic doesn't change this. You shouldn't notice any difference using the XHTML DOM (unless you are currently using LazyDOM, in which case you won't get the benefit of deferred node expansion) other than the fact that your templates will need to be XHTML compliant. See Diez' contrib project, which uses the XHTML DOM. If you upgrade to XMLC 2.3 beta3, you will be able format HTML as XHTML using oo.setFormat(OutputOptions.FORMAT_XHTML). In this case, you need make zero changes to your HTML templates, but get XHTML (all lower-case element names) as output. Be sure to read the 2.3 release notes as they detail the OutputOptions you'll need. Don't forget to use oo.setXHTMLCompatibility(true)! Jake At 02:07 PM 4/21/2007, you wrote: >Using the new Google weboptimizer tool (for >multi-variate testing) requires that a certain >chunk of their Javascript be encased in lowercase <script> and </script>. > >I am dynamically populating the chunk of >Javascript (between the <script> tags), but the >resulting HTML output always ends up with >uppercase <SCRIPT>, since the <script> in my >html template also contains a directive, e.g. ><script class="Dir::Get_Data.WebTemplate.HeadBegin"></script> > >I was thinking that an xmlc compile option could >force all html tags to lowercase, but could not find one. > >I am using latest Barracuda (2.1) any help appreciated. > >Thanks >Paul > > > >-- > >Barracuda mailing list > >Barracuda@... > >http://www.objectweb.org/wws/lists/projects/barracuda -- Barracuda mailing list Barracuda@... http://www.objectweb.org/wws/lists/projects/barracuda |
|
|
Re: Forcing lowercase <script>Hi Paul, I have an update that might interest you. If you upgrade to XMLC 2.3_RC1, you will find a new option in OutputOptions... oo.setForceHTMLLowerCase(boolean) By setting that to "true", HTML output as HTML or XHTML output as HTML will be lower-case. If it is unset or set to "false", HTML will be output in upper-case, as it usually is, and XHTML output as HTML will be forced upper-case (to be consistent with the default HTML output). I'm hoping for RC1 to be the one and only release candidate. If no one experiences problems (or if I don't find any myself), I'll simply change the version to "2.3" and release it. So, you can consider RC1 pretty stable. Note that you will have to pay attention to the Xerces (and xml-apis) version. Ideally it should be 2.9.0 (the latest) and certainly cannot be any older than 2.8.0, as previous versions are totally incompatible with XMLC 2.3. You should take care to update all environments that you run XMLC under including, but not limited to, Ant (ANT_HOME/lib) and your application server, such as Tomcat ("CATALINA_HOME/common/endorsed" for Tomcat 5.x.xx and "CATALINA_HOME/endorsed" under Tomcat 6.0.xx). Read the XMLC 2.3 release notes for more info. BTW, if you use Barracuda's block iteration feature, then you'll need to build Barracuda jars yourself from either the trunk or the "legacy-pre-jdk1.5" branch (building from the branch is recommended to ensure you stay fully compatible with code that depends on the 2.1 release). There was a bug that I fixed post Barracuda 2.1 to make it compatible with XMLC 2.3 when using block iteration. If you don't use block iteration, then Barracuda 2.1 will work just fine with XMLC 2.3. Jake At 03:20 PM 4/21/2007, you wrote: > >With XMLC 2.2.xx, your only option is to use the >XHTML DOM. The HTML DOM stores element names in >upper-case and the formatting logic doesn't >change this. You shouldn't notice any difference >using the XHTML DOM (unless you are currently >using LazyDOM, in which case you won't get the >benefit of deferred node expansion) other than >the fact that your templates will need to be >XHTML compliant. See Diez' contrib project, which uses the XHTML DOM. > >If you upgrade to XMLC 2.3 beta3, you will be >able format HTML as XHTML using >oo.setFormat(OutputOptions.FORMAT_XHTML). In >this case, you need make zero changes to your >HTML templates, but get XHTML (all lower-case >element names) as output. Be sure to read the >2.3 release notes as they detail the >OutputOptions you'll need. Don't forget to use oo.setXHTMLCompatibility(true)! > > >Jake > >At 02:07 PM 4/21/2007, you wrote: >>Using the new Google weboptimizer tool (for >>multi-variate testing) requires that a certain >>chunk of their Javascript be encased in lowercase <script> and </script>. >> >>I am dynamically populating the chunk of >>Javascript (between the <script> tags), but the >>resulting HTML output always ends up with >>uppercase <SCRIPT>, since the <script> in my >>html template also contains a directive, e.g. >><script class="Dir::Get_Data.WebTemplate.HeadBegin"></script> >> >>I was thinking that an xmlc compile option could >>force all html tags to lowercase, but could not find one. >> >>I am using latest Barracuda (2.1) any help appreciated. >> >>Thanks >>Paul >> >> >> >>-- >> >>Barracuda mailing list >> >>Barracuda@... >> >>http://www.objectweb.org/wws/lists/projects/barracuda > > > > > >-- > >Barracuda mailing list > >Barracuda@... > >http://www.objectweb.org/wws/lists/projects/barracuda -- Barracuda mailing list Barracuda@... http://www.objectweb.org/wws/lists/projects/barracuda |
| Free Forum Powered by Nabble | Forum Help |