RDF Parser

table of contents

about this document

state

I made some effort to divy the state betweeb the RdfParser and the RdfDB. The RdfParser maintains only that state that is associated with how the triples are serialized in XML.

elements

The elements of state that need to be stored are:
mode
whether we are expecting a Description, propertyElt, member, etc.
trusting
whether we are trusting encountered triples. This is part of the Attributions that I'm sketching out.
container
type
The type of a [6.13] typedNode. This will be NULL for a [6.3] description that is not a typedNode.

The mode changes at the start and end of each XML element. container, type and trusting change each time a description is encountered. Because nested RDF statements alternate between [6.13] typedNode and [6.3] description, every other tag in a tag stack has a description associated with it. I stuck all of these into a single stack. The parsing steps in RDF-ImpNotes show how these were set and used for each tag.