XML Entities and DTLs

40 views
Skip to first unread message

Sean

unread,
Dec 10, 2013, 5:49:14 PM12/10/13
to Ensemble-in...@googlegroups.com

We are using DTLS to transform an EnsLib.EDI.XML.Document object to an EnsLib.HL7.Message.  We are experiencing issues with source values that contain XML entities.  We could ZCONVERT each value that we map to convert the entities into characters but I would like to avoid adding a ZCONVERT to every possible mapping that could contain a string.  Is there a setting I could change on EnsLib.EDI.XML.Document that would do this automatically when I do a GetValueAt.  Any other possible solutions?

Thanks
Sean

Jonathan Levinson

unread,
Dec 10, 2013, 6:05:56 PM12/10/13
to Ensemble-in...@googlegroups.com

You haven’t said what version of Ensemble you are on or what patches to XML VDoc are applied.

 

We did add an output flag to GetValueAt:

 

o : output unescaped - for instance don't change < to &lt;

 

For instance,

 

GetValueAt(“/”,”o”)

 

You might need JSL4239 which is in a forthcoming release of Ensemble:

 

Fixed ProdLog #110819: XMLvDoc: option "o" not applied correctly to special

characters

...

 

In DOM path code, found case where $$$CONDXMLESCAPE($g(pFormat),...) was not

called.

 

In Prop path code, change propParsePath to use pFormat and in a couple of cases

where we are dealing with a single value from the Prop cache, we change code to 

invoke $$$CONDXMLESCAPE macro.

 

Regards,

Jonathan

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Lawrence Harris

unread,
Dec 10, 2013, 6:08:20 PM12/10/13
to <Ensemble-in-Healthcare@googlegroups.com>
I believe that GetValueAt is a method on EnsLib.EDI.XML.Document.  If you create your own document as a subclass of EnsLib.EDI.XML.Document you can override GetValueAt and do anything you need to.

Class MyDocument Extends EnsLib.EDI.XML.Document 
{
Method GetValueAs(
pSegmentPropertyPath As %String,
pSeparators As %String,
Output pStatus As %Status) As %String
{
// First do whatever the default method does and get the base value
Set tValue = ##super(pSegmentPropertyPath, pSeparators, .pStatus)
Quit:$$$ISERR(pStatus) tValue
// Now do whatever you need to to tValue before you return it
// you can alter pStatus to return an error if need be as well
:
Quit tModifiedValue
}
}
Lawrence Harris
activEHR
by EMRlogic Systems

Sean

unread,
Dec 10, 2013, 6:14:12 PM12/10/13
to Ensemble-in...@googlegroups.com, lha...@emrlogic.com
Great solution.  We are actually subclassing EnsLib.EDI.XML.Document currently. Very simple fix.

Thanks
Sean


On Tuesday, December 10, 2013 5:08:20 PM UTC-6, Lawrence Harris wrote:
I believe that GetValueAt is a method on EnsLib.EDI.XML.Document.  If you create your own document as a subclass of EnsLib.EDI.XML.Document you can override GetValueAt and do anything you need to.

Class MyDocument Extends EnsLib.EDI.XML.Document 
{
Method GetValueAs(
pSegmentPropertyPath As %String,
pSeparators As %String,
Output pStatus As %Status) As %String
{
// First do whatever the default method does and get the base value
Set tValue = ##super(pSegmentPropertyPath, pSeparators, .pStatus)
Quit:$$$ISERR(pStatus) tValue
// Now do whatever you need to to tValue before you return it
// you can alter pStatus to return an error if need be as well
:
Quit tModifiedValue
}
}
Lawrence Harris
activEHR
by EMRlogic Systems

On 2013-12-10, at 2:49 PM, Sean wrote:


We are using DTLS to transform an EnsLib.EDI.XML.Document object to an EnsLib.HL7.Message.  We are experiencing issues with source values that contain XML entities.  We could ZCONVERT each value that we map to convert the entities into characters but I would like to avoid adding a ZCONVERT to every possible mapping that could contain a string.  Is there a setting I could change on EnsLib.EDI.XML.Document that would do this automatically when I do a GetValueAt.  Any other possible solutions?

Thanks
Sean


--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-i...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healthcare+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages