[Home] [By Thread] [By Date] [Recent Entries]
The namespace axis is deprecated in Xslt from v2 and implementations do not need to support it. There are now functions to enquire about the in-scope namespaces. But the important thing is that the namespaces axis was not like attributes: it gives you the in-scope namespaces not the namespaces defined on the current element. I can see three different possible efinitions of 'empty' for namespaces. * If you want to know 'are there any in-scope namespaces defined for this node'? you use the in-scope namespace function. * If you want to know 'is this element in any namespace?' I think you can use the namespace accessor function. * If you want to know 'have any namespaces been declared on this element?' I think you check if the in-scope namespaces of the current element are the same as its parents using functions. (That will miss duplicate declarations, so it is not perfect.) When I do XPath training, I just leave out any details of the old namespace axis and say 'dont use it, it had problems, it varies by implementation, they deprecated it.' It isone example where fidelity source-to-source conversions need more info than the xsd data model (or the xml info set provides.) The other example is that we don't know whether an attribute got its value from being specified or implied from the DTD. I think that is because a lot of the technocrats came from the open source world, which basically meant that they used SGMLS: Omnimark provided a test WHEN ATTRIBUTE X IS SPECIFIED that was really useful. XML infoset and xpath data models allow regeneration of the parsed xml not tag-level transformations. Regards On 25/09/2016 8:40 AM, "Dimitre Novatchev" <dnovatchev@g...> wrote:
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



