[TYPO3-doc] DocBook: id attributes naming scheme

Sebastian Kurfürst sebastian at typo3.org
Wed Apr 20 09:16:51 CEST 2011


Hey François,

I agree with most parts you said here. A consistent and hierarchical ID
structure is definitely very much needed!

That's why I'd propose to add some XSL transformations to the DocBook
toolchain for the following functionality:

1) CHECK if the ID attributes are well-nested: i.e.
<set id="typo3v4">
<book id="typo3v4.tsref">
.....
   <programlisting id="foo"> ...</programlisting>
</book>
</set>
-> the transformation should yield an ERROR, stating that "foo"
did not start with "typo3v4.tsref

-> this will make it easy for us to do some pre-publishing checks, to
see whether the hierarchy is consistently used.

2) OUTPUT all ID attributes

3) Automatically PREFIX ID attributes:

If there is the DocBook:
<set id="typo3v4">
<book id="tsref">
...<programlisting id="foo">...</...>
</book>
</set>

this should be CONVERTED to:
<set id="typo3v4">
<book id="typo3v4.tsref">
...<programlisting id="typo3v4.tsref.foo">...</...>
</book>
</set>

The last tool would especially help when creating new documents -- i.e.
it's especially helpful for v5.

Greets,
Sebastian


More information about the TYPO3-project-documentation mailing list