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

Allow referencing to the same document #24

Closed tomschr closed 8 years ago

tomschr commented 8 years ago

According to the XInclude spec, the href attribute is optional:

The href attribute is optional; the absence of this attribute is the same as specifying href="", that is, the reference is to the same document.

I think it does make sense to allow referencing and including parts from the same document.

Some ideas:

Vogtinator commented 8 years ago

I think, we should also check if set-xml-id is there. We don't want the same IDs in the result document.

There are documents that have no xml:id anywhere, so set-xml-id isn't required. Also, the spec says that XInclude can generate invalid documents, so not allowing that would be an error.

Vogtinator commented 8 years ago

Implemented.