I'm trying to make part of the wicket-contrib-push-examples validate to 
html strict doctype...

For example this bit..

<script type="text/javascript" 
id="org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff"><!--/*--><![CDATA[/*><!--*/
dojo.registerModulePath("wicketstuff", 
"../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior");
/*-->]]>*/</script>

With the validation service complaining about

Error Line 14 column 83: character "/" is not allowed in the value of 
attribute "id"

You can trace this back in the code to

line 92 of wicketstuff-dojo AbstractDefaultDojoBehavior.java

private static final String DOJO_NAMESPACE_PREFIX = 
AbstractDefaultDojoBehavior.class.getName() + "/namespaces/";

In this case it's maybe a straight forward fix by just replacing hte "/" 
with "-"..

However the next script tag with an invalid id= attribute makes me a bit 
more reserved to just replace invalid characters with -

eg....
<script type="text/javascript" id="[Page class = 
org.wicketstuff.push.examples.pages.WicketCometdChat, id = 0, version = 
0]Interceptor"><!--/*--><![CDATA[/*><!--*/

Here we have to replace "[" "=" "," " "]" and also can't begin the id 
attribute with a "-" so replacing the first "[" wouldn't work..  I'm 
also not sure the repercussions as it looks like there may be some data 
in the id attribute.  It's also possible to use "::" in place of the 
"-", but if this is done for non-script elements you may trigger a css bug.

My question is... What's the eaxy way and the correct way to fix this so 
that it validates?


Thanks

Christopher

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to