HTML

scriptcontextname: js, scriptcontext: org.tagnetic.core.scriptcontext.implementer.javascript.JavaScriptContext

The tag handlers defined in this config file handle HTML tags. All of them use the TagCollector tag handler to do the work. TagCollector collects the tag if the view:collect attribute is specified on the script tag.

These tag collectors are useful particularly if you have componentized your HTML as HTML fragment files that can be included in other HTML pages, but the HTML fragments depend on certain scripts or style sheets. You can specify those script/style sheets in the HTML fragments, and they will automatically be placed as children of the <head> element in the resulting HTML page.

If a collected tag is already in the tag collector's list, it will not add it again to the list. The output order of the collected list is the same order in which they are encountered during Tagneto processing. You can change the order using the view:priority attribute. Lower priorities are printed before higher priorities. So, view:priority="0" would be the first one printed. If multiple tags specify the same priority, the last tag encountered during Tagneto processing will be at that position. It will push the other tags after it, in the printing order.

Examples:

<script view:collect="true" src="Library.js" view:priority="5"></script>

<script view:collect="true" view:priority="5"> function changeBackgroundColor() { document.getElementById('colorDiv').style.backgroundColor = 'gray'; } </script>

<link view:collect="true" rel="stylesheet" href="Style.css" type="text/css"/>

<style view:collect="true" type="text/css" view:priority="0"> #colorDiv { border: solid 1px black; } </style>

script

classname: org.tagnetic.tagneto.tags.view.TagCollector
See above for usage.

view:collect

  • property: collect
  • default:

view:priority

  • property: priority
  • default:

collectorprefix

  • property: collectorprefix
  • default: view:

link

classname: org.tagnetic.tagneto.tags.view.TagCollector
See above for usage.

view:collect

  • property: collect
  • default:

view:priority

  • property: priority
  • default:

collectorprefix

  • property: collectorprefix
  • default: view:

style

classname: org.tagnetic.tagneto.tags.view.TagCollector
See above for usage.

view:collect

  • property: collect
  • default:

view:priority

  • property: priority
  • default:

collectorprefix

  • property: collectorprefix
  • default: view:
Copyright © 2005 tagnetic.org.