Skip to main content

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,

I guess what you intend to do is

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

or

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

I guess what you intend to do is

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

or

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

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


Reply