The XPointer processor is based upon a javacc parser generator. It reads in any XPointer expression and parses it into a vector of pointer parts. Each pointer part exposes information about:
- The XPointer scheme (local name and namespace prefix for the scheme)
- The data for the XPointer part, both in escaped and unescaped format.
To fully resolve the XPointer scheme information, it is necessary to analyse the xmlns() pointer parts and use the information that they provide to resolve the qnames for other custom scheme-based pointer parts.
The Grammar file, PointerGrammar.jj, is contained in the source distribution.
To test the XPointer parser, try running the it as follows (making sure that the necessary XBRLAPI jars are on your class path):
java org.xbrlapi.xpointer.parser.PointerGrammar [XPOINTER EXPRESSION]