Extreme Markup 2003: Day 4

1 minute read

Nordstom

Linking strategies Provides some useful guidelines on using XLink in real document management. Nothing much to say here but this would be a useful paper to read. Points like having IDs being autogenerated to ensure that they’re unique in the document set.

The QA session turns into an interesting discussion of training writers to work in the right way. One quote: 7 years to train writers not to say ‘see page ' and use ‘' instead.

Henry Thompson

Uniform Access to Infosets via Reflection The infoset defines the data model of XML but it can be extended via XML Schema (new properties can be added to it). How can we use XPath to refer to things in this extended data model.

Reflection: where a syntactic form is analysed and re-expressed using the same language, eg. so that the only functions are ‘apply’:

(f x y)
(apply f (list x y )) (apply f (apply list ...))

Reflection in infosets: define an XML document which describes the infoset of a document which uses fewer element names (or only element names and attributes.

<document size="10"/> 
<child namespace="" localname="document">
      <attribute namespace="" localname="size" value="10"/> </child>

Define Edinburgh Normal Form which encodes infoset in terms of and

Extend XPath to give access to extended infosets via reflection without actually re-serialising. Use an extension fn reflect() to do this, then uses XPath on the reflected infoset to access things:

p:reflect()/child[@localname="document"]/     attribute[@localname="size"]/@value

Note that reflect takes no args and the namespace determines what kind of reflection is being done. Example (look at paper) adds info on types to the reflection.

But, the PSVI isn’t a tree so how can you reflect it as a tree. In the implementation (based on Saxon — which provides good support for this) they don’t really build the tree, only traverse it lazily. Sure this is dangerous but the onus is on the user to avoid the kinds of patterns that would trigger this circularity.

Has done some thinking about how to deal with circularity in particular for the case where you want to compare identity of nodes.

Updated: