DocBook|Search
Class Reference
%XML.ImportHandler
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%XML] >  [ImportHandler]
Private  Storage  

class %XML.ImportHandler extends %XML.SAX.ContentHandler

SAX Content handler for Cache' Objects XML Implementation.

This class and the data structgure dsefined here is used internally by Caché. You should not make direct use of this class or data structure within your applications. The global data structure may be accessed using the macros in %xmlDOM.inc or by using the %XML.Node class. There is no guarantee made about either the behavior or future operation of this class.

This content handler stores the XML document as nodes of a tree. The GlobalName property determines where these nodes are stored. The default for the GlobalName property is ||%xmlTemp. The Tree property determines the specific node used to store the nodes of the tree. The structure of the tree is as follows:

The tree is stored @..GlobalName@(..Tree) which is stored in ..DocumentId. @..GlobalName@(..Tree) - number of nodes. @i%DocumentId@(node) describes the node given by the integer node number. Nodes are ordered by appearance in the original XML document. A node can be either an element or character data. You need two nodes to represent an element and its character content. A node for element that contains the element name and a single child node containing the character data.

Each node is structured as follows:
@i%DocumentId@(node) is the unqualified element name (elements) or character data. @i%DocumentId@(node,0) is the description of the node as a $list in the following order: 1 is the type of the node: "e" for element, "c" for character data or "w" for character data that is only whitespace. 2 is the node number of this node's parent. 3 is index of the URI for this element or not stored. 4 is the original qname for the element, if that is different from the unqualified element name. If the qname and the unqualified name are the same, then this node is not present. 5 is line part of the location for element node. 6 is column part of the location for element node. 7 is 1 if xsi:nil or xsi:null specified as true or 1, otherwise not stored. @i%DocumentId@(node,"c",child)=type is the type of the child node at the node numbered child ("e" for element, "c" for character data or "w" for character data that is only whitespace) @i%DocumentId@(node,"a",attr)=value is the attribute with attr=value. @i%DocumentId@(node,"q",attr) is the original qname for the attribute, if that is different from the unqualified attribute name. If the qname and the unqualified name are the same, then this node is not present. @i%DocumentId@(node,"a",attr,"u") is the URI for the attribute's name. @i%DocumentId@(node,"a",attr,"v") is the URI corresponding to the prefix when the attribute value is of the form "prefix:value". The version of the internal content handler is given by a single integer in @i%DocumentId@("v")=version integer Errors and warnings are returned as follows. The SAX parser also returns immediately following a fatal error with an error status: @i%DocumentId@(type)=count where type is "fatalerror", "error" or "warning". @i%DocumentId@(type,index)=message Elements with "id" attributes are indexed as follows: @i%DocumentId@("id",id)=node where id is the value of "id" atribute and node is the node containing the "id" attribute. The list of namespaces used in this XML document is maintained as: @i%DocumentId@("ns")=the number of namespaces used by this XML document. @i%DocumentId@("ns",namespace)=index @i%DocumentId@("ns#",index)=namespace where namespace is the the uri for a namespace and index is the integer index used for this namespace in the "u" and "v" nodes above. @i%DocumentId@("ns","http://www.w3.org/2001/XMLSchema-instance")=1 and @i%DocumentId@("ns#",1)="http://www.w3.org/2001/XMLSchema-instance" are always true to allow easy lookup of the schema instance namespace: "http://www.w3.org/2001/XMLSchema-instance"

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22


Summary

Methods
%%OIDGet %AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject CopyDocument KillDocument LocatePosition
Mask PopHandler PushHandler SerializeBase64Node
SerializeNode comment endCDATA endDTD
endDocument endEntity ignorableWhitespace processingInstruction
skippedEntity startCDATA startDTD startEntity

Subclasses
%XML.Document

Methods

• method CopyDocument() as %String
Make a copy of the document to another node in the same global. Return the document id of the copy.
• classmethod KillDocument(documentId)
Kill the document specified by the documentId argument
• classmethod SerializeBase64Node(tree As %Integer, node As %Integer, outputStream As %Boolean, ByRef data, hex As %Boolean = 0) as %Boolean
Serialize the base64 encoded text children of this node as text.
tree is the id of the ML document tree.
node is the id of the node to be serialized.
outputStream is true if the serialized output is to be sent to to the existing stream data.
outputStream is false if the serialized output is to be be appended to the string data. data is created if it is not already defined.
• classmethod SerializeNode(tree As %String, node As %Integer, outputStream As %Boolean, mixed As %Integer = 0, ByRef data, includeTop As %Boolean = 0, lineMode As %Boolean = 0) as %Boolean
Serialize the children of this node as text.
tree is the id of the ML document tree.
node is the id of the node to be serialized.
outputStream is true if the serialized output is to be sent to to the existing stream data.
outputStream is false if the serialized output is to be be appended to the string data. data is created if it is not already defined.
mixed is true if child elements should be serialized, else an error is returned if child elements are found. mixed=1 uses XML translate table. mixed=2 uses HTML translate table.
includeTop is true if the containing element should be included in the returned output.
lineMode is true if the stream output should be written in line oriented mode, else the stream output will be written as a continuous block.