OK, I believe language is an "attribute" of the roadName, rather than a tag value.
If <roadName> was a child of <road> (for example) then the syntax is:
//road/roadName to fetch the road name
//road/roadName/@lang to fetch the language attribute of the road name
You can use that syntax in a number of places. I think you can use it in the XML reader parameters, also in XMLFlattener/Fragmenter transformers, or even an XQueryExtractor.
I think that's all correct, but I will try and create a quick example to make sure.
Actually, I'm not sure even that is needed. I just created this XML:
<xml>
<road>
<roadName xml:lang='English'>St George Street</roadName>
</road>
</xml>
And picked the roadName as a source path to read in the XML reader. It returned both roadName and roadName.lang as attributes.
Maybe it's because yours is GML, so you might need to do something with the XML fragments of it.
Hi @Mark2AtSafe,
could you please send me a quick example using the //road/roadName/@lang expression in XQueryExtractor? I can't see the roadName.lang as an attribute if using the application schema within the GML... However, I can see this attribute if I do ignore the application schema but I don't want to go down this road.
Thanks
Hi @honkovam, if you have to use the application schema anyway, a possible way would be: read the road names for each feature with another XML reader, process them as required, and then merge the processed road name attribute to the features which have been read by the GML reader.
The concrete way to read, process, and merge depends on the actual schema of the dataset.