Skip to main content
Solved

XMLUpdater path with multiple variables


Forum|alt.badge.img+1

Hi,

I'm understanding slowly how to use XQuery but I have come across yet another stumbling block.

I have an XMLUpdater and I want to replace the contents of the following path with some code:

XML Path:

//group[@id=fme:get-attribute("CODE") @category=fme:get-attribute("CATEGORY")]

I'm pretty sure that the above code is not the correct syntax for referencing two variables at once but I can't find any information on how to do this. Any ideas?

Thanks,

Best answer by takashi

I guess what you intend to do is

//group[@id=fme:get-attribute("CODE"and @category=fme:get-attribute("CATEGORY")]

or

//group[@id=fme:get-attribute("CODE"or @category=fme:get-attribute("CATEGORY")]
View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • January 27, 2020

I guess what you intend to do is

//group[@id=fme:get-attribute("CODE"and @category=fme:get-attribute("CATEGORY")]

or

//group[@id=fme:get-attribute("CODE"or @category=fme:get-attribute("CATEGORY")]

Forum|alt.badge.img+1
  • Author
  • January 27, 2020
takashi wrote:

I guess what you intend to do is

//group[@id=fme:get-attribute("CODE"and @category=fme:get-attribute("CATEGORY")]

or

//group[@id=fme:get-attribute("CODE"or @category=fme:get-attribute("CATEGORY")]

Perfect!  Thank you @takashi, the AND statement works just as I'd hoped!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings