, the file will be named with "blah" where the star is. If the file is documenting more than one tag that can be used interchangeably, the file should be named for the first one that appears in the heading of the file. (See #3, below, for details on the heading of the tag reference files.) 2. The information that is extracted from each file appears between pairs of flags. Each tag reference file has 10 occurrences of this flag, bracketing 5 chunks of information. IMPORTANT: In order to assure predictable processing of the extracted information, make sure there is no white space between the flags and the beginning/end of an information chunk. 3. Here's an example of a heading of a file for a standard 2.0 tag:

<field>

Here's an example for a extension:

<foreach>

Here's an example for a 2.1 feature:

<data>

Here's an example if more than one tag can be used interchangeably:

<sentence>, <s>

IMPORTANT: When the script needs to strip off the angled brackets, it takes 4 characters off the beginning and 1 character off the end. So make sure that the tag is formatted like "<blah>" in the heading. 4. Here's an example of attribute documentation for a standard tag. Note that the last five attributes are extensions to the spec: <field name="string" expr="ECMAScript_Expression" cond="ECMAScript_Expression" type="boolean" | "currency" | "date" | "digits" | "number" | "phone" | "time" slot="string" modal="boolean" saveutterance="boolean" utterancedest="string" endbeep="boolean" audioinexpr="ECMAScript_Expression" wakeupword="boolean"> child elements </field> Here's an example for a extension: <foreach array="ECMAScript_Variable" item="ECMAScript_Variable"> child elements </foreach> IMPORTANT: When editing/creating a tag reference file, make sure that the Syntax section is formatted exactly as above, with FOUR SPACES before each attribute. This is necessary because " " is the delimiter that is used to break the syntax information into a list of attributes. IMPORTANT: For attributes that have a list of possible values documented, make sure to include a space on either side of the vertical bar (ex. "boolean" | "currency"), to ensure that the line can be wrapped when output in the chart. 5. Here's an example of a parent/child tag list for a standard tag. Note that the second parent/child is an extension to the spec:

<block>, <catch>, <nomatch>

Here's an example for a extension:

<block>, <catch>, <nomatch>

Here's an example for a tag that has no parents or has no children:

None.

IMPORTANT: If there are more than one parent/child, make sure to use commas at the end of each line, except the last line. 6. The compliance information should come from the tag reference's Limitations/Restrictions section. Here's an example when there are no Limitations/Restrictions at all:

None.

(This will generate "Compliant." in the chart.) Here's an example when the Limitations/Restrictions in the tag reference should not be displayed in the Compliance column. (Maybe they're just notes about commonly occurring issues, where the tag itself is supported with all the correct parents and children, and basically works in the specified manner.)

Limitations/Restrictions

(The part that is commented out will be uncommented and used in the chart; in this case, it will be converted to "Compliant.", but it could be anything - a single sentence, or an alternate list, as in the following example.) Here's an example when the Limitations/Restrictions in the tag reference lists some limitations that should be considered non-compliance, and some that shouldn't be.

Limitations/Restrictions

(The part that is commented out will be uncommented and used in the chart.) Here's an example when the Limitations/Restrictions are exactly what should appear in the compliance column:

Limitations/Restrictions

Here's an example for a extension:

None.

*/ ?> // and returns them in an array. function getInfo ($fileContents) { $parseResults = explode("", $fileContents); $tagInfo = array($parseResults[1], $parseResults[3], $parseResults[5], $parseResults[7], $parseResults[9]); return $tagInfo; } // Takes a list of items, separated by a delimiter, removes the delimiter // and any white space, and adds line breaks in between all the items. // For example: input - "a, b, c, d"; output - "a
b
c
d". // Since the output is being used as the content for a table cell, return // " " rather than null, if there are no items in the list. function formatList ($inputList, $delimiter) { $itemArray = explode($delimiter, $inputList); foreach ($itemArray as $counter => $item) { $item = trim($item); if ($counter == 0) { $outputList = $item; } else { $outputList .= "
".$item; } } return (($outputList=="") ? " " : $outputList); } // Takes the compliance information from the Limitations/Restrictions // section of the tag reference file and formats it. If we don't want // to output the exact information that's displayed for the tag reference, // substitute text may be included as a comment in the tag reference file. // If the tag reference page has "None." under Limitations/Restrictions, // then the tag is fully compliant to the VoiceXML specification, so this // function should return "Compliant.". Note that this may need to be // done in addition to removing commenting (ex. if original text is // ). function formatCompliance ($compliance) { // If text is commented out; just remove the commenting. if (strpos($compliance,'') === 0) { $extString = "class=\"vg_extension\" "; $tag = substr($tag,18); } if (strpos($tag,'') === 0) { $extString = "class=\"21_feature\" "; $tag = substr($tag,17); } // Display this row of the table: ?> href="vxml2tag_st_.html#standardtags">

Speech Markup (SSML) Tags

$filename) { // Get contents of file into a string. $handle = fopen($filename, "r"); $tagFileContents = fread($handle, filesize($filename)); fclose($handle); // Parse the contents for the five pieces of information to be displayed in the Tag Summary Chart. $tagInfo = getInfo($tagFileContents); list($tag,$attributes,$parents,$children,$compliance) = $tagInfo; // If the header includes the xxxEXTxxx prefix, use the vg_extension // class in the link for this tag, which makes the link color // #339900 (green). Also, remove the prefix from the header. // If the header includes the xxx21xxx prefix, use the 21_feature // class in the 'a href' link for this tag, which makes the link color // #FF9900 (orange). Also, remove the prefix from the header. $extString = ""; if (strpos($tag,'') === 0) { $extString = "class=\"vg_extension\" "; $tag = substr($tag,18); } if (strpos($tag,'') === 0) { $extString = "class=\"21_feature\" "; $tag = substr($tag,17); } // If $tag contains a comma-separated list of tag names that can be // used interchangeably, just use the first one to extract the link; // save this link information as a separate variable, since the full // list of tags should still be used for the actual displayed text. $commaIndex = strpos($tag,','); if ($commaIndex !== false) { $tagLink = substr($tag,0,$commaIndex); } else { $tagLink = $tag; } // Display this row of the table: ?>
Tag
Attributes
Parent Elements
Child Elements
VoiceXML 2.0 Compliance
href="vxml2tag_ss_.html#ssmltags">