Replies: 1 comment 7 replies
-
Whenever the PML reference manual states "string" (or "string or null") it really means that any string (e.g. any sequence of Unicode characters) is allowed. This must of course be changed for attribute ID. The value should be restricted and compatibility with HTML anchors must be ensured.
This would be a good start. We would have a single, simple rule for attribute IDs and parameter IDs. The rule(s) might be relaxed in the future.
I have appended the following text to the 'Description' field for IDs: The internal check of the value by the converter application remains to be done. |
Beta Was this translation helpful? Give feedback.
-
Elsewhere, you clarified that constant parameters IDs must be named according to the
[a-zA-Z][a-zA-Z0-9_]*
pattern.But what about attributes IDs which will generated HTML anchors? Do they also follow the same pattern, or do they support the XML naming convention?
Asciidoctor, for example, follows the
[a-zA-Z][a-zA-Z0-9_]*
pattern for naming attributes, but supports XML naming for anchors, following the XML 1.0 specs:I believe that the XML naming convention for anchors provides better i18n support, since it covers special letters (accents, diacritics, etc.) and maybe some non-Latin alphabets too (I'm not sure, I haven't check all those chars ranges).
Obviously, the PML spec could simply restrict anchor names to the
[a-zA-Z][a-zA-Z0-9_]*
pattern, or operate some transformations (like various markdown tools already do).Whichever the case, it's worth mentioning it in the PML Reference Manual, for clarity's sake — also, editor plug-ins developers need this info to implement the PML ID type for attributes values. Currently, the CLI help mentions these ID attributes to be of "string" type, e.g.:
where "string" is a rather generic definition, unlike other specific types (e.g. "date"). It might make sense to document both the parameter and anchor IDs as their own types (e.g. "id" and "anchor_id"), provide their pattern definitions (or patterns, if they differ).
Beta Was this translation helpful? Give feedback.
All reactions