In the tibco custom process, we often need to convert some data into strings in XML format. In this case, we need the "render XML" sub-control in the XML control. (Lin49940)
Let's not talk about the specific usage. Let's talk about a problem!
The "input Editor" option of this control references a schema XSD file that has been designed, in which the custom
Xmlns: Ind = "http://www.lin49940.com/2012/10-20-ns-ind"
Xmlns: recognition = "http://www.lin49940.com/2012/10-20-ns-atr"
I want to output text in this XML format: <ind: Document ID = '000000'> <ASD: Name> my files </ASD: Name> </ind: document>
However, the output XML text is: <ns0: Document ID = '000000'> <NS1: Name> my files </NS1: Name> </ns0: document>
This is the problem!
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If no one can ask, I found the process with the control in the tibco example and compared it by opening these processes in text (the texts of these files are in XML format, I found some differences, such as the registered namespace in the <PD: processdefinition> node and the <PD: inputbindings in the corresponding <PD: activity> node.
Excludeprefixes = ""> the red mark is displayed multiple times, and the content in it is different from ns0 and non-ns0, which we cannot see in the tibco designer.
I directly modified the text of the process. After saving it, I found that the output of the "render XML" control is correct! It seems that all the key points have been found! However, I cannot always work by modifying the process text, so I tried to modify it in the tibco design tool! The specific steps are in the following content!
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Click our process. The following figure is displayed. Click the pen icon.
- After you click the pen button, a window appears, which contains the namespace used by the process.
- The first two are the default ones in tibco, and the last two are the custom ones in my schema. In the tibco process execution, if he uses a namespace not added, he will report an error, however, the namespace will be automatically added later, but its "prefix" is similar to NS or ns0. Obviously this is not what we want!
- Do not modify the content in this file. Many of them are automatically added by the tibco designer based on the control you added. accidental deletion will affect the running of the process, generally, tibco.com and w3.org are both added to tibco, so you do not need to change them.
- So if we have a custom namespace,We need to configure the custom namespace here. If yes, you can directly modify the prefix value. Note that the value of "prefix" must be correct..
- The tab page "schema Imports" in the figure above contains the XSD file we referenced and its associated namespace.
- Note: This step cannot solve the problem, but now you need to check my "render XML" usage.
- Now the most important "input" is set
- Select render XML in the Red Circle, click the exclamation point icon in the image, and a window appears.
- After checking this information, click "OK", then "Apply", and then save it!
- Execute the process. OK. The output XML format is correct !!!!
PS. When we directly copy the "render XML" control to any process, its "exclude result Prefixes" is not selected, so we need to manually hook it up.