Using xquery to extract attribute value from xml which contains namespaces?

Your title is matching a title attribute in no namespace, yet you are looking for a title element in the xlink namespace. Changing the test to xlink:title will fix this The path is returning an attribute node which is then copied into the li element, which will give a result something like: li xlink:title Whereas I suspect you actually want the data from the attribute Change your last line to li>{doc($xml)/prefix:catalog/prefix:catalogRef/@xlink:tile/data(.)}.

Your @title is matching a title attribute in no namespace, yet you are looking for a title element in the xlink namespace. Changing the test to @xlink:title will fix this. The path is returning an attribute node which is then copied into the li element, which will give a result something like: Whereas I suspect you actually want the data from the attribute.

Change your last line to {doc($xml)/prefix:catalog/prefix:catalogRef/@xlink:tile/data(.)} and everything should work.

1 alternately, use string() instead of data(): {string(doc($xml)/prefix:catalog/prefix:catalogRef/@xlink:tile)} – evil otto Aug 5 at 17:27.

Your @title is matching a title attribute in no namespace, yet you are looking for a title element in the xlink namespace. Changing the test to @xlink:title will fix this. Whereas I suspect you actually want the data from the attribute.

And everything should work.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions