Arbortext Command Language > Functions by Alphabetical Listing > oid_invalid_markup
  
oid_invalid_markup
oid_invalid_markup (oid)
This function returns 0 if the start tag identified by oid contains no invalid markup. This means it is a foreign namespace element, or it is a declared element and all of its attributes are declared and have valid values.
If this function does not return 0 then the result is a bit mask that can be inspected to determine which parts of the tag are invalid.
0x01— This bit will be set if the element is not declared and is not a foreign namespace element.
0x02— This bit will be set if a declared attribute has a value which is invalid for that attribute type.
0x04— This bit will be set if there are attributes which are undeclared for that element.
Example:
function give_invalid_status(oid)
{
local oim
local result
oim = oid_invalid_markup(oid)
result = ""
if (oim == 0){
result .= "Start tag contains no invalid markup."
} else {
if (oim & 0x01) {
result .= "Start tag is undeclared. "
}
if (oim & 0x02) {
result .= "Start tag contains an invalid \
attribute value for a declared attribute. "
}
if (oim & 0x04) {
result .= "Start tag contains an undeclared \
attribute. "
}
}
response(result)
}
Related Topics
oid_unknown function
oid_unknown_attr_list function