use a grammar to create document sections (link handling - not working)