@@ -42,3 +42,27 @@ There are some other important files:
42
42
Including common warnings, notes, etc.
43
43
- * translation.xml* - this file is used to store all central translation info, like a small
44
44
intro text for translators and the persons list. This file is not present in the English tree.
45
+
46
+ ## ` xml:id ` structure
47
+
48
+ The PHP Manual is a complex document that uses a lot of ` xml:id ` for anchoring,
49
+ linking and XInclude purposes, so some care is necessary when dealing with
50
+ them. The pseudo-types of ` xml:id ` used in manual are:
51
+
52
+ * ** Structural IDs** . IDs that are defined in structural level DocBook
53
+ elements, like <chapter >` , ` <section >`, etc.
54
+
55
+ * ** XInclude IDs** . IDs that are defined in some other elements, to be targeted
56
+ by ` <xi:include> ` functionality.
57
+
58
+ Structural IDs use the ` id.id ` pattern, while XInclude IDs use the
59
+ ` structural.id..local.ṕath ` pattern. That is, Structural IDs only use one dot
60
+ as separator, while XInclude IDs are composed of the one existing Structural ID
61
+ as prefix, an ` .. ` separator, and a local path suffix.
62
+
63
+ No ` xml:id ` can be defined twice in source XMLs. Yet, it is possible that
64
+ XInclude functionality generates duplicated IDs while building manuals, as
65
+ libxml2 does * not* implement XIncludes 1.1. The ` configure.php ` script strips
66
+ these generated duplicated IDs automatically, but manual editors should strive
67
+ to avoid generated duplicated IDs by using XInclude that ` xpointer ` to XInclude
68
+ IDs instead of proper XPointer/XPaths.
0 commit comments