Re: Manually adding version information to "random pages" now possible
| From: | Hannes Magnusson | Date: | Wed, 06 Jul 2011 08:30:14 +0000 |
| Subject: | Re: Manually adding version information to "random pages" now possible | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969382882@lists.php.net to get a copy of this message | ||
On Wed, Jul 6, 2011 at 07:13, Alexey Shein <confik@gmail.com> wrote:
> Great news!
> Some thoughts on improvement:
> I think it would be better to have print-version-for attribute
> optional, so if it's absent phd would take current xml:id of current
> section i.e. its parent, because it will be frequently written as
> <sect1 xml:id="control.structures.alternative-syntax" ... >
> <?phpdoc print-version-for="control-structures.alternative-syntax"?>
They don't match the xml:id. It matches whatever you write in the
versions.xml file.
For example, functions have the xml:id "function.function-name", while
the versions.xml entry only has "function-name".
In general you would have stuff like <chapter
xml:id="language.stuff.traits"><title>Traits</title><?phpdoc
print-version-for="traits"></chapter>
I don't think its wise to have an separate element for this, and
definitively not unnamespaced.
Having it as a process instruction shows clear intent, and doesn't
bloat our markup and still keeps compatibility with other renders as
it will simply get silently ignored for those who don't support it.
-Hannes