Question

Test/Filter values of related xml atributes

  • 15 March 2016
  • 0 replies
  • 0 views

Badge

Within a series of xml files read into a workspace each xml file contains an attribute 'Code' that will contain a single value from a restricted set of values. Within the same xml files, depending upon the Code value will be a series of attributes in which the attribute name of each will be prefixed by the Code value of the feature. So I may have a feature with a Code value of 'Fd_I' and a series of attributes with name like 'Fd_I_Monument Depth', 'Fd_I_Monument Condition', etc. When processing the attributes within these xml files I need to concatenate some of the values from these related attributes base upon the values they contain. I set up an Attribute Creator to create a temp attribute for each of the related attributes, in each case setting up conditional tests that would check for the existence of the related attributes and its value. So for example I would have a check in place like '@Value(Code)_Monument Depth NOT ATTRIBUTE IS MISSING AND ...'. Unfortunately this is throwing the following error:

@Evaluate -- failed to evaluate expression `expr Fd_I_Monument Depth' --

AttributeCreator_3: Failed to evaluate function Evaluate(Fd_I_Monument Depth)

AttributeCreator_3: Failed to evaluate input expression: FME_CONDITIONAL:DEFAULT_VALUE'FME_NULL_VALUE'BOOL_OP;AND;COMPOSITE_TEST;<Unused>;TEST @Value(Code)_Monument Depth NOT_ATTRIBUTE_IS_MISSING _FME_BLANK_STRING_;TEST @Value(Code)_Monument Depth NOT_ATTRIBUTE_VALUE_NULL _FME_BLANK_STRING_;TEST @Value(Code)_Monument Depth NOT_ATTRIBUTE_IS_EMPTY _FME_BLANK_STRING_'@Evaluate(@Value(Code)_Monument Depth) 'FME_NUM_CONDITIONS2___

What FME tools could I use to check for the existence of the related attributes and their values before outputting their formatted values? Thanks!


0 replies

Be the first to reply!

Reply