diff options
author | David A. Madore <david+git@madore.org> | 2011-08-26 16:53:03 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2011-08-26 16:53:03 +0200 |
commit | 961bdfc66151b9aef46149e4730110ef409e5587 (patch) | |
tree | 4b6ad9a0e8253905af8d8f838ef2668fec4bfc0e /org/madore/damlengine/TodoStyleOrScript.java | |
parent | 7d3f4db185f5499160228afb228ecac6c6d22476 (diff) | |
download | damlengine-961bdfc66151b9aef46149e4730110ef409e5587.tar.gz damlengine-961bdfc66151b9aef46149e4730110ef409e5587.tar.bz2 damlengine-961bdfc66151b9aef46149e4730110ef409e5587.zip |
Move most of the context to a "general context" substructure.
This is so as to make sure that cloning (which does a shallow copy)
gives us references to the same mutable content.
Diffstat (limited to 'org/madore/damlengine/TodoStyleOrScript.java')
-rw-r--r-- | org/madore/damlengine/TodoStyleOrScript.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/org/madore/damlengine/TodoStyleOrScript.java b/org/madore/damlengine/TodoStyleOrScript.java index dcec137..cc00e11 100644 --- a/org/madore/damlengine/TodoStyleOrScript.java +++ b/org/madore/damlengine/TodoStyleOrScript.java @@ -31,18 +31,18 @@ public final class TodoStyleOrScript extends TodoItem { @Override public void handle() { - if ( ctx.headNode == null ) + if ( ctx.gc.headNode == null ) throw new IllegalStateException("head node is null when doing style or script"); Element node = ctx.doc.createElementNS(DamlEngine.XHTML_NS, t.eltName); node.setAttributeNS(null, "type", t.mimeType); if ( t==Type.SCRIPT ) node.setAttributeNS(null, "defer", "defer"); - ctx.headNode.appendChild(node); - ctx.headNode.appendChild(ctx.doc.createTextNode("\n")); + ctx.gc.headNode.appendChild(node); + ctx.gc.headNode.appendChild(ctx.doc.createTextNode("\n")); node.appendChild(ctx.doc.createTextNode("\n"+t.preCdata)); StringBuffer content - = (t==Type.SCRIPT)?ctx.scriptContent:ctx.styleContent; + = (t==Type.SCRIPT)?ctx.gc.scriptContent:ctx.gc.styleContent; node.appendChild(ctx.doc. createCDATASection(t.postCdata+content +t.preCdata)); |