Sunday August 18, 2019

      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
  Code Samples
  Site Search

Get SteelArrow!     
  Tags Also Can Contain Data    
Return to Basics Page
Tags can also contain data. In the previous example, we saw how tags have attributes to allow them to receive information specific to the tag. The <SASET> tag is similar to the HTML <IMG> tag in that it gets all of its information from the attributes that make up the tag.

Way back at the beginning of this document, we discussed the <B> tag. The bold tag took no attributes, but instead wrapped data in a start and end tag; namely <B>HELLO</B>. This example shows how a tag can be used to wrap data that is to be considered the data associated with the tag.

A tag that does not have an end tag is supposed to be written as <BR/>, notice the extra '/' within the BR element. This syntax denotes that the tag both starts and ends, and contains no associated data. Another HTML tag that should be written this way is the <IMG> tag since it to has no contained data, and as previously mentioned gets all of its information from the attributes that make up the tag itself.

In SteelArrow, there are many tags that are also start and end tags, and contain no data. Two that we have seen so far are the <SASET> and <SAOUTPUT> elements. As you look through the SteelArrow tag documentation, you will notice that some tags have the '/'. This should simply tell you that the tag starts and ends without wrapping any data. The syntax is for reference, and tags are not validated against this syntax, similar to that of HTML.

The next example shows a tag that does contain associated data. The element used in the example is the <SAOUTPUT> tag. As with the previous examples, view the document source to see that all of the SteelArrow tags have been removed from the output.

Some tags may take both attribues, and wrap data. The <SAOUTPUT> is an example of a SteelArrow tag that does both. <SAOUTPUT> has an attribute called SCOPE, that tells <SAOUTPUT> what context the data is to be seen in first. If the variable is not found in the described SCOPE, then the global scope is used to find the variable. As an example, the sample below shows the output of the SESSION object using the <SAOUTPUT> tag with the SCOPE attribute.

It is safe to assume that often attributes are not required within tags.


Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy