Ensemble XML Virtual Document Development Guide
Defining Data Transformations for XML Virtual Documents
|
|
method GetValueAt(pPropertyPath As %String, pFormat As %String, Output pStatus As %Status) as %String
General Description | Character to Include in Format Setting | Specific Behavior |
---|---|---|
Line feeds and carriage returns | Adds a Windows-style carriage return and line feed combination after every text-free element. | |
Uses the stored line feeds and carriage returns. This option takes precedence over the options |
||
Includes a new line (line feed) after every text-free element. In contrast to |
||
Indentation. Note that these options are used only if the output includes new lines. | Indents each new line with four spaces. | |
Any integer from 1 to 9 | Indents each new line with this number of spaces. This option takes precedence over the previous indentation option. | |
Indents each new line with a tab. This option takes precedence over both of the previous indentation options. | ||
Uses the stored indentation whitespace. This option takes precedence over the previous indentation options. | ||
Handling attributes | Alphabetizes the attributes in an element. | |
Uses double quotes (rather than single quotes) to set off attribute values if possible. | ||
Handling namespaces | Suppresses output of namespace prefixes. | |
Suppresses output of namespace declarations. | ||
Handling empty elements | Generates output for each empty element with an open tag and close tag pair. If this option is not set, empty elements are output as a single empty tag. | |
Other | Canonical output. This option takes precedence over the options |
|
Generates the full element (including both the starting and ending tags), not just the contents within the element. | ||
Includes information about the location of the schema file that was loaded into Ensemble. This option takes effect only if you use |
||
Includes any XML entities as is, rather than performing XML escaping for those entities. | ||
Generates an XML header line that declares the given character encoding; |
Class Demo02.MyDTL Extends Ens.DataTransformDTL { XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] { <transform sourceClass='EnsLib.EDI.XML.Document' targetClass='EnsLib.EDI.XML.Document' sourceDocType='Demo02:Patient' targetDocType='Demo02:Patient' create='copy' language='objectscript' > <assign value='"this value is ignored"' property='target.{WorkAddress}' action='remove' /> <assign value='"this value is ignored"' property='target.{HomeAddress}' action='remove' /> </transform> } Parameter REPORTERRORS = 1; }
Class Demo02A.MyDTL Extends Ens.DataTransformDTL { XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] { <transform sourceClass='EnsLib.EDI.XML.Document' targetClass='EnsLib.EDI.XML.Document' create='copy' language='objectscript' > <assign value='"this value is ignored"' property='target.{/Patient/WorkAddress}' action='remove' /> <assign value='"this value is ignored"' property='target.{/Patient/HomeAddress}' action='remove' /> </transform> } Parameter REPORTERRORS = 1; }
Class Demo05.MyDTL Extends Ens.DataTransformDTL { XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] { <transform sourceClass='EnsLib.EDI.XML.Document' targetClass='EnsLib.EDI.XML.Document' sourceDocType='Demo05:Patient' targetDocType='Demo05:Patient' create='new' language='objectscript' > <assign value='source.{MRN}' property='target.{MRN}' action='set' /> <assign value='source.{PrimaryCarePhysician}' property='target.{PrimaryCarePhysician}' action='set' /> </transform> } Parameter REPORTERRORS = 1; }
Class Demo05A.MyDTL Extends Ens.DataTransformDTL { XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] { <transform sourceClass='EnsLib.EDI.XML.Document' targetClass='EnsLib.EDI.XML.Document' create='new' language='objectscript' > <assign value='source.{/Patient/MRN}' property='target.{/Patient/MRN}' action='set' /> <assign value='source.{/Patient/PrimaryCarePhysician}' property='target.{/Patient/PrimaryCarePhysician}' action='set' /> </transform> } Parameter REPORTERRORS = 1; }
Class Demo06.MyDTL Extends Ens.DataTransformDTL { XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] { <transform sourceClass='EnsLib.EDI.XML.Document' targetClass='EnsLib.EDI.XML.Document' create='copy' language='objectscript' > <code> <![CDATA[ //this part adds an attribute to the document set path="/1/@NewAttribute" set status=target.SetValueAt("New attribute value",path) if 'status {do ##class(MyApp.Utils).Trace("Demo06.MyDTL","Error setting path: ",path)} //this part adds a comment to the document set path="/1/comment()" set status=target.SetValueAt("This is an XML comment",path) if 'status {do ##class(MyApp.Utils).Trace("Demo06.MyDTL","Error setting path: ",path)} ]]> </code> </transform> } Parameter REPORTERRORS = 1; }
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
|
Content for this page loaded from EXML.xml on 2019-02-22 02:28:44
|