diff options
Diffstat (limited to 'org/madore/damlengine/TodoDamlElement.java')
-rw-r--r-- | org/madore/damlengine/TodoDamlElement.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/org/madore/damlengine/TodoDamlElement.java b/org/madore/damlengine/TodoDamlElement.java index fefd0f1..330c92d 100644 --- a/org/madore/damlengine/TodoDamlElement.java +++ b/org/madore/damlengine/TodoDamlElement.java @@ -50,6 +50,29 @@ public class TodoDamlElement extends TodoDefaultElement { ctx.htmlNode.appendChild(ctx.doc.createTextNode("\n")); ctx.headNode.appendChild(ctx.doc.createTextNode("\n")); + ctx.styleContent = new StringBuffer(); + ctx.scriptContent = new StringBuffer(); + + Element meta; + meta = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "meta"); + meta.setAttributeNS(null, "http-equiv", "Content-Type"); + meta.setAttributeNS(null, "content", "text/html; charset=utf-8"); + ctx.headNode.appendChild(meta); + ctx.headNode.appendChild(ctx.doc.createTextNode("\n")); + if ( lang != null ) { + meta = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "meta"); + meta.setAttributeNS(null, "http-equiv", "Content-Language"); + meta.setAttributeNS(null, "content", lang); + ctx.headNode.appendChild(meta); + ctx.headNode.appendChild(ctx.doc.createTextNode("\n")); + } + meta = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "link"); + meta.setAttributeNS(null, "rel", "Shortcut Icon"); + meta.setAttributeNS(null, "href", (((uriToTop!=null)?uriToTop:"") + +"favicon.ico")); + ctx.headNode.appendChild(meta); + ctx.headNode.appendChild(ctx.doc.createTextNode("\n")); + ArrayList<Node> childList = getChildList(this.node); ArrayList<TodoElement> toProcess = new ArrayList<TodoElement>(childList.size()); for ( Node child : childList ) { @@ -73,6 +96,12 @@ public class TodoDamlElement extends TodoDefaultElement { } } this.ownerDeque.registerAtStart(toProcess); + this.ownerDeque. + registerAtEnd(new TodoStyleOrScript(TodoStyleOrScript.Type.STYLE, + this.ctx, new DamlOptions())); + this.ownerDeque. + registerAtEnd(new TodoStyleOrScript(TodoStyleOrScript.Type.SCRIPT, + this.ctx, new DamlOptions())); } } |