infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Xlate: insert comment into XML outbound
Jim Kosloskey
All,
What I would like to do is to insert comments in an outbound XML message via the Xlate.
Does this require strategically placed entries in the schema which are placeholders for comments, or is there a method within the Xlate (using XML for outbound) which can insert a comment (my thought is there is not), or will I need Tcl after the Xlate to place comments?
My aim is to make the resultant XML message easier to read for debugging.
I know I can enter comments free hand wherever by using any XML editor so it does not appear XML provides a placeholder for comments in it's language set.
However, being a novice at XML, I am unsure of all of the potentials.
Find more posts tagged with
Clovertech
Comments
RobertKersemakers
Hi Jim,
At first I thought you wanted to know if there's a way to include comments in an XML, but after rereading your question I think you already know this:
The syntax for writing comments in XML is similar to that of HTML.
<!-- This is a comment -->
I don't think it's possible to just insert comments with an Xlate: Xlates will need a field to place their information. So I agree with you: either include extra fields in the XSD/DTD to insert the comments or insert the comments after the Xlate with tcl.
If you could insert comments with an Xlate, the problem would be how to indicate where you want this comment to be inside the XML.
Jim Kosloskey
Robert,
You understand what I was asking.
I was pretty sure that comments would need a placeholder in the schema in order to use the Xlate to populate comments but I felt it was worht aksing in case I was missing something.
I would be reluctant to modify a vendor's schema to add comments as then that becomes my schema to maintain and if the schema failed to function it would be difficult to request the vendor to repair the schema.
At this point I think using Tcl to add comments after the fact is more trouble than it is worth and I would need to design something that was reusable and yet meaningful to the person configuring the use of the proc.
Given the verbosity of XML it sure would be helpful to be able to have comments when trying to figure out what is where in the message.
Thanks