Ignore:
Timestamp:
Oct 16, 2012, 5:48:15 PM (7 years ago)
Author:
nmedfort
Message:

More work; mostly edits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/Working/icXML/arch-namespace.tex

    r2449 r2470  
    3232
    3333
    34 In Xerces, every URI is mapped to a unique URI ID number.
    35 These IDs persist throughout the lifetime of the application.
     34In both Xerces and ICXML, every URI has a one-to-one mapping to a URI ID.
     35These persist for the lifetime of the application through the use of a global URI pool.
    3636Xerces maintains a stack of namespace scopes that is pushed (popped) every time a start tag (end tag) occurs
    3737in the document. Because a namespace declaration affects the entire element, it must be processed prior to
     
    4040(1) those that declare a set of namespaces upfront and never change them, and
    4141(2) those that repeatidly modify the namespace scope within the document in predictable patterns.
     42
     43For that reason, ICXML contains an independent namespace stack and utilizes bit vectors to cheaply perform
     44% speculation and
     45scope resolution options with a single XOR operation---even if many alterations are performed.
     46% performance advantage figure?? average cycles/byte cost?
     47When a prefix is declared (e.g., \verb|xmlns:p="pub.net"|), a namespace binding is created that maps
     48the prefix (which are assigned Prefix IDs in the symbol resolution process) to the URI.
     49Each unique namespace binding has a unique namespace id (NSID) and every prefix contains a bit vector marking every
     50NSID that has ever been associated with it within the document. For example, in Table \ref{tbl:namespace1}, the
     51prefix binding set of \verb|p| and \verb|xmlns| would be \verb|01| and \verb|11| respectively.
     52To resolve the in-scope namespace binding for each prefix, a bit vector of the currently visible namespaces is
     53maintained by the system. By ANDing the prefix bit vector with the currently visible namespaces, the in-scope
     54NSID can be found using a bit scan instruction.
     55A namespace binding table, similar to Table \ref{tbl:namespace1}, provides the actual URI ID.
    4256
    4357\begin{table}[h]
     
    5468\end{table}
    5569
    56 For that reason, ICXML contains an independent namespace stack and utilizes bit vectors to cheaply perform
    57 % speculation and
    58 scope resolution options with a single XOR operation---even if many alterations are performed.
    59 % performance advantage figure?? average cycles/byte cost?
    60 When a prefix is declared (e.g., \verb|xmlns:p="pub.net"|), a namespace binding is created that maps
    61 the prefix, which are assigned prefix ids in the symbol resolution process, to the URI.
    62 Each unique URI is provided with an URI ID through the use of a global URI pool, similar to Xerces.
    63 Each unique namespace binding has a unique namespace id (NSID) and every prefix contains a bit vector marking every
    64 NSID that has ever been associated with it within the document. For example, in Table \ref{tbl:namespace1}, the
    65 prefix binding set of \verb|p| and \verb|xmlns| would be \verb|01| and \verb|11| respectively.
    66 To resolve the in-scope namespace binding for each prefix, a bit vector of the currently visible namespaces is
    67 maintained by the system. By ANDing the prefix bit vector with the currently visible namespaces, the in-scope
    68 NSID can be found using a bit scan instruction. A namespace binding table, similar to Table \ref{tbl:namespace1},
    69 provides the actual URI ID.
    70 
    7170% PrefixBindings = PrefixBindingTable[prefixID];
    7271% VisiblePrefixBinding = PrefixBindings & CurrentlyVisibleNamespaces;
     
    7877within a stack of bit vectors denoting the locally modified namespace bindings. When an end tag is found, the
    7978currently visible namespaces is XORed with the vector at the top of the stack.
     79This allows any number of changes to be performed at each scope-level with a constant time.
    8080% Speculation can be handled by probing the historical information within the stack but that goes beyond the scope of this paper.
Note: See TracChangeset for help on using the changeset viewer.