Author |
Message
|
Drakcir |
Posted: Mon May 12, 2008 4:09 am Post subject: Problem with attributes |
|
|
Newbie
Joined: 12 May 2008 Posts: 3
|
Hi,
I have a problem with attributes in my message set. In debug mode they show up with an @-sign. eg. "@Qualifier". What does this indicate?
The select-block iterates through all elements, but wont find a match.
The following code works fine with another part of my message where the attributes don't show up as "@attribute".
Code: |
SET OutPtr.InvoiceAmountTrans = COALESCE(
THE(SELECT ITEM REF.fs:MonetaryAmount.fe:Amount
FROM InPtr.MonetaryAmounts[] AS REF
WHERE REF.Qualifier = 'InvoiceAmountTrans')
,'');
|
Help is very much appriciated  |
|
Back to top |
|
 |
elvis_gn |
Posted: Mon May 12, 2008 10:43 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Drakcir,
The @ symbol indicates the attributes in your msgset.
To access an attribute use
InputRoot.XMLNS.someNS:someTag.(XML.attr)<attributeName>
And if your attributes are not showing up as attributes in some part of the message, then that part is wrong, as the attributes must be coming as elements.
Regards. |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 12, 2008 11:25 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The MRM XML parser puts an @ on the front of self-defining attributes. If this is happening, it almost always means that your message definition is incorrect. If you are using v6.0 or later you will get warnings in the user trace about self-defining data.
If you are not using the MRM parser, please ignore this.
elvis: I don't think Drakcir is using the XMLNS domain. |
|
Back to top |
|
 |
Drakcir |
Posted: Mon May 12, 2008 12:27 pm Post subject: |
|
|
Newbie
Joined: 12 May 2008 Posts: 3
|
Thanks for your replies!
Kimbert, you are correct, I'm using the MRM domain.
The message set is created from an import of a XML Schema. A schema which I have created partly from an old schema. I have added repeating elements with attributes to distinguish them. But they don't seem to be working correctly. |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 12, 2008 3:10 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
All very interesting, but if you want any more help you'll have to be a lot more specific.
- which version of WMB?
- what's the schema like?
- what's the instance document like? |
|
Back to top |
|
 |
Drakcir |
Posted: Tue May 13, 2008 9:53 pm Post subject: |
|
|
Newbie
Joined: 12 May 2008 Posts: 3
|
I'm using WMB 6.1.
I think I know what caused the problem. The message I used (a XML document) didn't match the message set and I forgot to validate the message. But one weird thing remains, two of the attributes in the message did not have @ in front of them. |
|
Back to top |
|
 |
cjr8020 |
Posted: Tue Jan 20, 2009 6:33 pm Post subject: |
|
|
Newbie
Joined: 25 Sep 2006 Posts: 8
|
Having a similar issue.
runtime 6.0.0.8
toolkit 6.0.2
Working in MRM domain. I had trouble accessing XML attributes with ESQL code. Debuging showed that these attributes appeared with the '@' sign on the front. However, I don't understand why these attributes are treated as self-defining:
- these attributes are defined in the XSD that was used to generate the message set in use here
- I'm using the Validate node prior to the Compute where I'm accessing the attributes. This node is configured to check domain, set and type, and validate contents and value. The input passes validation.
- I can successfully validate the input message against the schema using another tool, say, XMLSpy.
I can certainly use the following syntax to access these attributes:
Code: |
Element."@Attribute1" |
however, I understand this is a workaround and would rather investigate why these attributes are perceived as self-defining.
Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jan 21, 2009 2:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hard to say without detailed knowledge of your schema and XML doc. Have you taken a user trace? |
|
Back to top |
|
 |
cjr8020 |
Posted: Wed Jan 21, 2009 6:05 pm Post subject: |
|
|
Newbie
Joined: 25 Sep 2006 Posts: 8
|
User trace showed that every element and attribute in the input message was self-defining. I then rebuilt the message set from scratch; and, of course, everything is good - nothing is self-defining any longer.
Still curious as to what might have caused it. About the only thing I did with the message set after it was created is that I updated it to reflect a change in the XSD by removing and recreating the corresponding message definition. But then again, this action has not caused this (self-defining) problem in the past.
Thanks again. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 22, 2009 12:58 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Glad it's working now. You will probably never find out what the problem was, but that's software for you. Probably a single-character error in the namespace URI or something like that. |
|
Back to top |
|
 |
|