]> git.kaiwu.me - nginx.git/commitdiff
Basic inter-document and external linking support.
authorRuslan Ermilov <ru@nginx.com>
Thu, 8 Sep 2011 13:26:06 +0000 (13:26 +0000)
committerRuslan Ermilov <ru@nginx.com>
Thu, 8 Sep 2011 13:26:06 +0000 (13:26 +0000)
docs/dtd/module.dtd
docs/xsls/content.xsls

index 0b21673ef7286a9648ea464b4fe82c4a83785c22..d280b90a35bb62bb78bc243902611226d3446ceb 100644 (file)
@@ -55,6 +55,7 @@
 <!ATTLIST   link
             doc         CDATA #IMPLIED
             id          CDATA #IMPLIED
+            url         CDATA #IMPLIED
 >
 
 <!ELEMENT   list        (listitem+ | (tag-name | tag-desc)+) >
index 9d4bd02e3d47fa503a25608b9f7cbcd4aa284c23..c6fe14e9fc268bb1aece2b26dd9d4a4deb7e5f94 100644 (file)
@@ -39,7 +39,14 @@ X:stylesheet {
         X:text{ (} !{@code} X:text{)}
     }
 
+    X:template = "link[@url]" { <a href="{@url}"> !!; </a> }
     X:template = "link[@id and not(@doc)]" { <a href="#{@id}"> !!; </a> }
+    X:template = "link[@doc and not(@id)]" {
+        <a href="{substring-before(@doc, '.xml')}.html"> !!; </a>
+    }
+    X:template = "link[@id and @doc]" {
+        <a href="{substring-before(@doc, '.xml')}.html#{@id}"> !!; </a>
+    }
     X:template = "link" { <u> !!; </u> }
 
     X:template = "list[@type='bullet']" { <ul> !!; </ul> }