openSUSE / dbxincluder

Transclusions for DocBook with XInclude 1.1
https://opensuse.github.io/dbxincluder
GNU General Public License v3.0
2 stars 3 forks source link

XPointer support #2

Closed tomschr closed 3 years ago

tomschr commented 8 years ago

Originated from openSUSE/daps#229

It would be nice if the dbxincluder could support some XPointer expressions.

Vogtinator commented 8 years ago

Intentionally not implemented. The only required feature of XPointers is to refer to a specific element, which is already possible with "fragid". See also tests/cases/transclusion.case.xml.

lxml does not provide an abstraction of libxml2's XPointer implementation. Reimplementing that in python is not only very prone to bugs, unnecessary work. It wouldn't be a problem to add support for XPointer later when lxml supports them.

tomschr commented 8 years ago

Right, this issue originated from an older DAPS bug. I see it more of an reminder of further investigation for me than of anything that should be implemented now by you. :-)

However, in the current state, it seems very unlikely that XPointer support will ever be fully implemented, be it in libxml2 or lxml. The problem with XPointer is, that some specs are published as recommendation, but others are not.

Maybe some "simple" XPointers expressions could be supported in the future...