Browse
 
Tools
Rss Categories

Base URI

Reference Number: AA-01078 Views: 1528 0 Rating/ Voters

Declaring a base URI in a grammar tells the grammar how to resolve relative path names in the grammar.

If no base URI is present, they will be resolved relative to the location of the grammar file itself. Grammars loaded by buffer should have a base URI if they contain relative path names.

Grammars may have multiple base paths, and they are searched in the order provided.

ABNF

base <http://www.mycompany.com/grammars>;
base <http://www.mycompany.com/more_grammars>;

XML

<grammar xml:base="http://www.mycompany.com/grammars"
xml:base="http://www.mycompany.com/more_grammars"
...
>