String language;
String code;
Node content;
int position;
Node node;
Attribute attribute;
Vector vector;
if (tag instanceof ScriptTag)
{
language = ((ScriptTag)tag).getLanguage ();
if ((null != language) &&
(language.equalsIgnoreCase ("JScript.Encode") ||
language.equalsIgnoreCase ("VBScript.Encode")))
{
code = ScriptDecoder.Decode (lexer.getPage (), lexer.getCursor ());
((ScriptTag)tag).setScriptCode (code);
}
}
content = lexer.parseCDATA (!STRICT);
position = lexer.getPosition ();
node = lexer.nextNode (false);
if (null != node)
if (!(node instanceof Tag) || !( ((Tag)node).isEndTag ()
&& ((Tag)node).getTagName ().equals (tag.getIds ()[0])))
{
lexer.setPosition (position);
node = null;
}
// build new end tag if required
if (null == node)
{
attribute = new Attribute ("/script", null);
vector = new Vector ();
vector.addElement (attribute);
node = lexer.getNodeFactory ().createTagNode (
lexer.getPage (), position, position, vector);
}