EnsLib.EDI.XML.Document
persistent class EnsLib.EDI.XML.Document extends %Library.Persistent, EnsLib.EDI.XML.Prop, %XML.SAX.EntityResolver, %XML.Adaptor
SQL Table Name: EnsLib_EDI_XML.Document
This class encapsulates an XML document stream and provides methods to interrogate and update it Two types of path strings can be used to identify a document node: a 'Property path' that is based in a particular XML schema definition (xsd), irrespective of any particular document instance, and a 'DOM path' that is based in the structure of a particular document irrespective of any XML schema. The DOM Path uses XPATH conventions; it always starts with '/' while a Property Path never does.Property Inventory
Method Inventory
- CommittedMode()
- CopyValues()
- DumpMaps()
- EnumerateDocTypesClose()
- EnumerateDocTypesExecute()
- EnumerateDocTypesFetch()
- EnumerateTypeCategoriesClose()
- EnumerateTypeCategoriesExecute()
- EnumerateTypeCategoriesFetch()
- GetContentArray()
- GetSubDocumentAt()
- GetValueAt()
- GetValues()
- GetValuesArray()
- IdentifierGet()
- ImportFromDevice()
- ImportFromFile()
- ImportFromIOStream()
- ImportFromLibraryStream()
- ImportFromString()
- KillGlobals()
- NameGet()
- OutputHTMLZen()
- OutputToDevice()
- OutputToFile()
- OutputToIOStream()
- OutputToLibraryStream()
- OutputToString()
- Purge()
- RawContentGet()
- SetMaxCalcCache()
- SetSubDocumentAt()
- SetValueAt()
- TotalCount()
- TypeVersionGet()
- Validate()
Parameters
Properties
Whilst this might improve performance the output may have nodes in a different order than desired when combining with single property path sets.
This setting is provided for backwards compatibility.
The default is to set to the internal intermediary Property storage.
Methods
pTargetPath contains the property path to the target set
pAction contains an action code: "set", etc..
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
This method in implemented within the document class.
The content array is in the form:
pContents(n,"type")="%String"
pContents(n,"name")="Field"
pContents(n,"alias")=alias code
If pContents(n) is non-zero then the property is a composite type with
sub-properties. The sub-properties are indexed with a similar structure under
pContents(n,m) where m is the index of the subtype property.
Retrieve an XML virtual document constructed from the tree identified by pPropertyPath. This path may be either a "DOM Path" or a "Property Path". The Document instance is created using the supplied pPropertyPath as the root of the tree -- this is equivalent to calling the GetValueAt()() with the "f" format flag specified.
A "DOM Path" is schema independent and starts from the document root with a '/' character and is delimited by the '/' character at each level of descent, and by square brackets '[' and ']' for repeating elements.
A "Property Path" is based on a simplified projection of the XML schema applied to the current document by way of its DocType property. It starts from the root element (one level down from the XML document root) and is delimited by the "." character and by parentheses '(' and ')' for repeating elements.
The third pFormat defaults to f if not supplied.Pass in d in the pFormat string parameter to include namespace declarations from the top of source document. The f format parameter will be added if not inluded in the parameter.
- 1-9 : indent with this number of spaces (4 is the default with the 'i' format specifier)
- a : attributes alphabetical
- c : canonical ; ignores 'eintw'
- e : close elements even when empty
- f : full top element not just its contents
- g : suppress output of empty elements
- i : indent with 4 spaces unless 't' or 1-9
- l : output schema information, schema uri and schema location, based on property stored in ..schemaLocation
- n : newline (lf) after every text-free element
- o : output unescaped - for instance don't change < to <
- p : suppress output of namespace prefixes
- q : use double quotes to set off attribute values if possible
- s : use stored indentation whitespace (ignores 'it1-9')
- r : use stored returns / newlines (ignores 'nw')
- t : indent with tab
- u : declare prefixes as well as using them
- w : Windows-style cr/lf newline after every text-free element
- x : omit namespaces in output
The XML representation is the GetValueAt using "/1" as the property path except if the target Property Path where the sub document is to be set is of type "any" then the XML representation of pSubDocument retrieved will be the full document including top element i.e. path "/"
pValue contains the value to set.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
pAction contains an action code: "set", "clear", "append", etc.
Queries
The DocType is returned as the first column in the result set.
The Category parameter can be used to restrict the list.
If Category is:
0 - return only DocTypes in standard categories
+ - return only DocTypes in user-defined categories
empty - return DocTypes from all categories
a category name - return only DocTypes in the named category
a partial name suffixed with '%' - return only DocTypes in categories matching the partial category name
other - return nothing
If IncludeBase is:
0 - return only DocTypes defined in the current schema category itself
1 - return all DocTypes in the current schema category's base category in addition to those defined in the current category itself
The Standard parameter can be used to restrict the list.
If Standard is: 0 - return only standard categories + - return only user-defined categories empty - return all categories a category name - return only the named category a partial name suffixed with '%' - return only categories matching the partial category name other - return nothing
Indexes
Triggers
Inherited Members
Inherited Properties
- %CalcCount
- %MaxCalcCache
- %PurgeIndex
- DocType
- DocTypeCategory
- DocTypeName
- Format
- IsMutable
- OriginalDocId
- SchemaStatus
- Source
- TimeCreated
- UserValues
- attributeCount
- attributeSub
- namespaceMapping
- pDSubsList
- prevElem
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %CompareContents()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %DrawHTMLForm()
- %DrawHTMLTable()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetContentType()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %OnTimeout()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %ProcessSubmit()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %ShowContents()
- %ShowContentsHead()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- DocTypeSet()
- DrawFormButtons()
- DrawHTMLContentsForm()
- DrawHTMLForm()
- EnumerateVDocsClose()
- EnumerateVDocsExecute()
- EnumerateVDocsFetch()
- GetAlias()
- GetNewManagerLinks()
- GetStatsDimension()
- IsMutableSet()
- LocatePosition()
- Mask()
- NormalizeElementNamespacePrefix()
- NormalizeNamespacePrefix()
- OnPostParse()
- PokeDocType()
- PopHandler()
- PushHandler()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchemaNamespace()
- XMLSchemaType()
- choiceGetCount()
- choiceGetIndex()
- endCDATA()
- endDTD()
- endDocument()
- endEntity()
- error()
- getTestNewArg()
- insertIndex()
- sequenceGetCount()
- skippedEntity()
- startCDATA()
- startDTD()
- startDocument()
- startEntity()
- syncSequence()
- warning()
Storage
Storage Model: Storage (EnsLib.EDI.XML.Document)
^EnsLib.EDI.XML.DocumentD(ID) |
= | %%CLASSNAME
%storedContentRef
DocType
TimeCreated
Source
IsMutable
OriginalDocId
|
Storage Model: Storage (EnsLib.EDI.XML.Document)
^EnsLib.EDI.XML.DocumentD(ID,"UserValues",n) |
= | UserValues(n) |