Skip to main content
Question

Output attributes from BulkAttributeRenamer missing ??

  • January 12, 2017
  • 5 replies
  • 92 views

lifalin2016
Influencer
Forum|alt.badge.img+41

Hi,

I've run into a curious problem.

I'm using an XmlFragmenter to extract certain elements from an XML file, and specifying that the attributes should be "flattened", giving them a custom prefix.

Then I use a couple of BulkAttributeRenamer with "Remove Prefix String" to remove the prefixes from the attribute names.

However, any transformer added to the flow after the BulkAttributeRenamer's cannot see the renamed attributes, and report an error if I enter the attribute names nonetheless, marking the transformer as invalid.

But if I run the workspace, ignoring the "invalid transformers", the output is as expected !

This is not a good situation, and is an invitation to future problems. Is there a way to remedy this ?

Cheers

Lars I.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

takashi
Celebrity
  • January 12, 2017

Hi @lifalin2016, did you expose the attribute names? Take a look at the "Attributes to Expose" parameter in the XMLFragmenter.


lifalin2016
Influencer
Forum|alt.badge.img+41
  • Author
  • Influencer
  • January 12, 2017
Correction:

 

 

It seems that the problem is with the XmlFragmenter, which doesn't include the read attributes into its list of output attributes.

 

 

The XmlFragmenter has the "Attributes to Expose" setting, but that list is manually populated without any form of help.

 

 

Is there a way to automate the population of this list, at least initially ?

 


takashi
Celebrity
  • January 12, 2017
Correction:

 

 

It seems that the problem is with the XmlFragmenter, which doesn't include the read attributes into its list of output attributes.

 

 

The XmlFragmenter has the "Attributes to Expose" setting, but that list is manually populated without any form of help.

 

 

Is there a way to automate the population of this list, at least initially ?

 

Sorry I'm unclear the requirement, but there is no way to expose attribute names automatically anyway... Can you provide a simplified source XML document and your desired translation result?

 


itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • January 12, 2017

Yes you will have to manually insert all the attributes to be exposed, no automated way ( as yet) to do that.


lifalin2016
Influencer
Forum|alt.badge.img+41
  • Author
  • Influencer
  • January 13, 2017

Hi all,

I've come to the conclusion, that XmlFragmenter is simply too problematic to be of any serious use.

Since the XML Reader stores sub-elements as lists too, I'm opting to use the ListExploder instead. Which really is a shame, since XML data ought to be handled by XML transformers. But as long as it's so inefficient, I'm choosing to work around it instead.

Thanks for the input on this.

Ps! There is a way to insert a huge amount of exposed attributes in the XmlFragmenter, but it involves hacking into the FMW in a text editor :-)

Cheers

Lars I.