Using 'Semantic Interpretation for Speech Recognition' to parse XML to the Infoset

Hi,

I've been reading the Semantic Interpretation for Speech Recognition 
working draft. It seems to me that it could be applied to any parsing 
job. So I've been trying to define how to parse XML to the infoset, and 
it works quite well:

$element =
  $STag {
    localName = $STag.localName,
    attributes = $STag.attributes}
  $content {children = $content.nodes}
  $ETag
  | $EmptyElemTag {
    localName = $EmptyElemTag.localName,
    attributes = $EmptyElemTag.attributes}

$STag =
  '<' $Name {localName=$Name.localName}
  {attributes = []}
  ($S $Attribute {Append(attributes, $Attribute)})<0->
  [$S] '>'

$Attribute =
  $Name {localName = $Name.localName}
  $Eq
  $AttValue {normalizedValue = $AttValue.normalizedValue}

Do you think it would be a good idea to extend the spec outside the speech
area? What would have to be added is conditions, f.e.:

$element =
  $STag {
    localName = $STag.localName,
    attributes = $STag.attributes}
  $content {children = $content.nodes}
  $ETag {$ETag.localName == localName}
|...

When any boolean expression evaluates to false, the rule would not match.

Sjoerd Visscher
w3future.com

Received on Saturday, 24 November 2001 09:02:58 UTC