Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Do DOM implementations fix up namespaces?

0
10 Posted

Do DOM implementations fix up namespaces?

0

When elements or attributes which have namespace prefixes are moved, it’s possible that the prefix no longer matches the same namespace URI. The DOM is always internally consistent, since each node carries its own namespace URI. It may or may not contain all the namespace declaration attributes in the right places, or have the prefixes matched up properly if those declarations do exist. The DOM is departing from canonical form, just a bit, in part because the DOM WG was concerned that continuously enforcing those restrictions could impose a significant amount of overhead. But it should contain all the data needed to allow reconciliation of those departures. If you think about this as a namespace_normalize() operation, it may make more sense. In Level 2, that normalization task is left as an exercise for the reader, but Level 3 is expected to provide a standardized version.

0

When elements or attributes which have namespace prefixes are moved, it’s possible that the prefix no longer matches the same namespace URI. The DOM is always internally consistent, since each node carries its own namespace URI. It may or may not contain all the namespace declaration attributes in the right places, or have the prefixes matched up properly if those declarations do exist. The DOM is departing from canonical form, just a bit, in part because the DOM WG was concerned that continuously enforcing those restrictions could impose a significant amount of overhead. But it should contain all the data needed to allow reconciliation of those departures. If you think about this as a namespace_normalize() operation, it may make more sense. In Level 2, that normalization task is left as an exercise for the reader, but Level 3 is expected to provide a standardized version.

0

When elements or attributes which have namespace prefixes are moved, it’s possible that the prefix no longer matches the same namespace URI. The DOM is always internally consistent, since each node carries its own namespace URI. It may or may not contain all the namespace declaration attributes in the right places, or have the prefixes matched up properly if those declarations do exist. The DOM is departing from canonical form, just a bit, in part because the DOM WG was concerned that continuously enforcing those restrictions could impose a significant amount of overhead. But it should contain all the data needed to allow reconciliation of those departures. If you think about this as a namespace_normalize() operation, it may make more sense. In Level 2, that normalization task is left as an exercise for the reader, but Level 3 is expected to provide a standardized version.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123