Question

Conditional Value error in XMLUpater

  • 5 February 2022
  • 4 replies
  • 17 views

Badge +8

Hi All, Hoping an extra set of eyes on this might solve this.

I am using XMLUpdater to update geodb_metadata_string and everything works fine until I use a Conditional Value. Then I produce the error below. I have tried several different conditional statements, with and without quotes and have run it as PlainText and as XQuery but always the error. Pics from the Updater and Conditional Value below. Thanks for any ideas.ConditionXMLUpdater

Starting translation...
Unbalanced quotation marks encountered on line 438 of file E:\GIS\FME\test\wb-xlate-1644023348637_43516 -- line was `FACTORY_DEF {*} XQueryFactory2    FACTORY_NAME { XMLUpdater }    INPUT DOCUMENT_FEATURE FEATURE_TYPE AttributeExposer_OUTPUT    INPUT QUERY_FEATURE FEATURE_TYPE Sheet1_XLSXR_2    FLUSH_WHEN_GROUPS_CHANGE { <Unused> }    XML_TEXT { "@EvaluateExpression(FDIV,STRING_ENCODED,<at>Value<openparen>geodb_metadata_string<closeparen>,XMLUpdater)" }    COLLECT_CONTEXT_ITEM_NAMESPACES YES    SEPARATE_DOCUMENT_FEATURES YES    GENERATE_QUERY REPLACE_VALUE_WITH_TEXT <solidus><solidus>metadata<solidus>dataIdInfo<solidus>idAbs TEXT @EvaluateExpression(FDIV,STRING_ENCODED,"FME_CONDITIONAL:DEFAULT_VALUE'<at>Abort<openparen>NO<space>FLAN<space>IN<space>THE<space>PAN<space>MAN<closeparen>'BOOL_OP;OR;COMPOSITE_TEST;1;TEST,XMLUpdater)    CONTEXT_ITEM_ATTR { "geodb_metadata_string" }    WRITE_XML_HEADER { YES }    OUTPUT { OUTPUT FEATURE_TYPE XMLUpdater_DOCUMENT        }'
Program Terminating
Translation FAILED.

 


4 replies

Userlevel 2
Badge +17

Hi @crutledge​ , I was able to reproduce the same error as you experienced. I think it's a sort of bug, hope someone from Safe takes a look into this.

In the interim, an XQuery expression might help you instead. 

xmlupdater-consitional-value-setting 

Badge +8

Hi @crutledge​ , I was able to reproduce the same error as you experienced. I think it's a sort of bug, hope someone from Safe takes a look into this.

In the interim, an XQuery expression might help you instead. 

xmlupdater-consitional-value-setting 

Hi @Takashi Iijima​ , Thanks for the work around. Will update when I get it working.

Best,

Clifford.

Badge +8

Hi All,

Well I successfully tried to get a simple conditional statement to work based on takashi's advice above but I am having trouble reading attributes. I am hoping for some advice on how best to get this working.....or if my logic and workflow are invalid. The screen capture of the workflow below is the results of numerous trouble shooting attempts to get a conditional comparison between an attribute from the Update Input and the Document Input in the XMLUpdater. I am attempting to update geodb_metadata_string where the fme_feature_type matches. So where the excel feature class name matches the name in the fme_feature_type attribute read from the geodatabase. So I basically want to have an if/else like

if name from spreadsheet = name in fme_feature_type then do this update

I just cannot seem to get a read on the fme_feature_type from the geodb in the XMLUpdater. But fme_feature_type has a value of "sheet1" from the excelreader. I tried renaming the attributes but no results. I hope someone can make some sense out of how I described this scenario. Any thoughts you have would be great and thanks.

ExceltoGDBMetadata

Badge +8

I forgot to mention that my issue here may be related to the potential bug described above. I logged the bug and now just waiting to hear back from the good folks at safe.

Reply