Author |
Message
|
rajasri |
Posted: Wed Aug 30, 2006 1:59 am Post subject: How to remove prifixes in XML message in MRM domain |
|
|
 Centurion
Joined: 11 Jun 2006 Posts: 114
|
Hi all, i have a problem. i troed it but couldnt find solution.I want to use MRM domain with XML format. i want to creata output like this.
<Document xmlns="urn:xxxxx">
<setr.010.001.02>
<MltplOrdrDtls>
<OrdrDtTm>2006-07-07T12:50:00</OrdrDtTm>
<InvstmtAcctDtls>
<AcctId>
<Prtry>
<Id>CITA100271</Id>
</Prtry> .............
i want to give xmlns but with out any prefixes,and the child elements should not have any prefixes. i can creata the same if i use xmlns domain, but due to specific reasons i have to use MRM.
i have also tried changing a property in message set, xml name space declaration set to :As required", but dint work. any suggestions would be highly appreciated. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Aug 30, 2006 4:38 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Did you try to enter a namespace URI with an empty prefix in the 'Namespace Settings' table? I just tried, and it seems that you cannot enter an empty prefix.
Quote: |
but due to specific reasons i have to use MRM |
Can you tell me what the reasons are? |
|
Back to top |
|
 |
rajasri |
Posted: Wed Aug 30, 2006 4:48 am Post subject: attribute |
|
|
 Centurion
Joined: 11 Jun 2006 Posts: 114
|
if i use XML domain, then i cant specify te messageset and messagetype. with MRM, i can. Yes, i know that ve can convert it into xml format using rcd, add an attribute and then convert it back to mrm. but it definitely adds overhead. would you please correct me if iam wrong and suggest me what to do? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Aug 30, 2006 1:22 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
if i use XML domain, then i cant specify te messageset and messagetype |
That's true. But you don't say why you want to do that. Are you validating your message? Are you using MRM null handling options?
What is it that you want to do? |
|
Back to top |
|
 |
iceage |
Posted: Wed Aug 30, 2006 4:31 pm Post subject: |
|
|
 Acolyte
Joined: 12 Apr 2006 Posts: 68
|
kimbert ,
Question off topic , but in same context - When i do a tree copy from InputRoot to OutputRoot - i end up picking up the namespace of InputRoot irrespective of XMLNSC or XMLNS domains .
For instance ,
Input <a xmlns="uri:a1">
<b/>
<c/>
</a>
Output <A xmlns="uri:A1">
<b/>
<c/>
</A>
Is there any way to instruct / suppress ? I got it working using XML domain , as it sounds more efficient than creating each element in OutputRoot explicitly?
Many thanks.
Sorry for hijacking the post !!! |
|
Back to top |
|
 |
rajasri |
Posted: Wed Aug 30, 2006 7:35 pm Post subject: xml |
|
|
 Centurion
Joined: 11 Jun 2006 Posts: 114
|
yes, ofcourse i want to validate my message against a message set. and i read some where that we can add attributes by changing the rendering property for xml format. if we thinkin other way, i just want to add an attribute "xmlns" to the root element. so is it possible to add this attribute, which will, in no means , mentioned in the message type. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 31, 2006 3:41 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
yes, ofcourse i want to validate my message against a message set |
Then of course you should have said so . There are many reasons for using a message set - validation is only one of them.
Quote: |
i read some where that we can add attributes by changing the rendering property for xml format. |
Sort of. You can change a simple element into an attribute or vice versa.
Quote: |
i just want to add an attribute "xmlns" to the root element |
You can control namespace declarations using the Namespace Settings table in the XML message set properties. Anything more advanced than that and you will need XMLNS/XMLNSC. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 31, 2006 12:09 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
rajasri,
Quote: |
When i do a tree copy from InputRoot to OutputRoot - i end up picking up the namespace of InputRoot irrespective of XMLNSC or XMLNS domains |
That's easily explained. In XMLNS/XMLNSC the outputting of namespace info is controlled by xmlns attributes in the tree. If you perform a tree copy of InputRoot.a to OutputRoot.a, then all the children of a will be copied, including the xmlns attribute(s). If you don't want the namespaces in your output message, delete the xmlns attribute(s) from it ( or else don't copy them in the first place). |
|
Back to top |
|
 |
|