forked from nginx/nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
155 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,72 @@ | ||
|
||
<!ELEMENT module (section+) > | ||
<!ATTLIST module title CDATA #REQUIRED | ||
link CDATA #REQUIRED | ||
lang (en) #REQUIRED | ||
<!ELEMENT module (section+) > | ||
<!ATTLIST module | ||
name CDATA #REQUIRED | ||
id ID #REQUIRED | ||
> | ||
|
||
<!ELEMENT section (directive+ | para+) > | ||
<!ATTLIST section title CDATA #REQUIRED | ||
name CDATA #IMPLIED | ||
<!ELEMENT section (directive+ | para+) > | ||
<!ATTLIST section | ||
name CDATA #REQUIRED | ||
id ID #IMPLIED | ||
> | ||
|
||
<!ELEMENT directive (syntax, default, context, para+) > | ||
<!ATTLIST directive name CDATA #REQUIRED > | ||
<!ELEMENT directive (syntax+, default, context+, para+) > | ||
<!ATTLIST directive | ||
name ID #REQUIRED | ||
appeared-in CDATA #IMPLIED | ||
> | ||
|
||
<!ELEMENT syntax (#PCDATA | argument | code | parameter | value)* > | ||
|
||
<!ELEMENT default (#PCDATA | code)* > | ||
|
||
<!ELEMENT context (#PCDATA)* > | ||
|
||
<!ELEMENT para (#PCDATA | argument | c-def | c-func | code | command | emphasis | example | header | http-error | link | list | note | parameter | value | var)* > | ||
|
||
<!ELEMENT argument (#PCDATA)* > | ||
|
||
<!ELEMENT c-def (#PCDATA)* > | ||
|
||
<!ELEMENT c-func (#PCDATA)* > | ||
|
||
<!ELEMENT code (#PCDATA | value)* > | ||
|
||
<!ELEMENT command (#PCDATA)* > | ||
|
||
<!ELEMENT emphasis (#PCDATA)* > | ||
|
||
<!ELEMENT example (#PCDATA)* > | ||
|
||
<!ELEMENT header (#PCDATA)* > | ||
|
||
<!ELEMENT http-error EMPTY > | ||
<!ATTLIST http-error | ||
code CDATA #REQUIRED | ||
text CDATA #IMPLIED | ||
> | ||
|
||
<!ELEMENT link (#PCDATA)* > | ||
<!ATTLIST link | ||
doc CDATA #IMPLIED | ||
id CDATA #IMPLIED | ||
> | ||
|
||
<!ELEMENT list (listitem+) > | ||
<!ATTLIST list | ||
type (bullet | enum) #REQUIRED | ||
> | ||
|
||
<!ELEMENT listitem ANY > | ||
|
||
<!ELEMENT note ANY > | ||
|
||
<!ELEMENT parameter (#PCDATA)* > | ||
|
||
<!ELEMENT syntax (#PCDATA | value)* > | ||
<!ELEMENT default (#PCDATA)* > | ||
<!ELEMENT context (#PCDATA)* > | ||
<!ELEMENT value (#PCDATA)* > | ||
|
||
<!ELEMENT para (#PCDATA | value)* > | ||
<!ELEMENT value (#PCDATA)* > | ||
<!ELEMENT var (#PCDATA)* > | ||
|
||
<!ENTITY nbsp " " > | ||
<!ENTITY mdash " - " > | ||
<!ENTITY nbsp " " > | ||
<!ENTITY mdash " - " > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,48 @@ | ||
X:stylesheet { | ||
|
||
X:template = "section[@name and @title]" { | ||
<a name="{@name}" /> <center><h4> !{@title} </h4></center> | ||
!!; | ||
} | ||
X:template = "section[@id and @name]" { | ||
<a name="{@id}" /> <center><h4> !{@name} </h4></center> | ||
!!; | ||
} | ||
|
||
X:template = "section[not(@name) and @title]" { | ||
<center><h4> !{@title} </h4></center> | ||
!!; | ||
} | ||
X:template = "section[not(@id) and @name]" { | ||
<center><h4> !{@name} </h4></center> | ||
!!; | ||
} | ||
|
||
X:template = "section[not(@id) and not(@name)]" { !!; } | ||
|
||
X:template = "para" { <p> !!; </p> } | ||
|
||
X:template = "c-def" { <code> !!; </code> } | ||
|
||
X:template = "c-func" { <code> !!; X:text{()} </code> } | ||
|
||
X:template = "code" { <code> !!; </code> } | ||
|
||
X:template = "command" { <code> !!; </code> } | ||
|
||
X:template = "example" { <blockquote><pre> !!; </pre></blockquote> } | ||
|
||
X:template = "emphasis" { <strong> !!; </strong> } | ||
|
||
X:template = "header" { <code> !!; </code> } | ||
|
||
X:template = "http-error" { | ||
<i> X:text{"} !{@text} X:text{"} </i> | ||
X:text{ (} !{@code} X:text{)} | ||
} | ||
|
||
X:template = "section[not(@name) and not(@title)]" { !!; } | ||
X:template = "link[@id and not(@doc)]" { <a href="#{@id}"> !!; </a> } | ||
X:template = "link" { <u> !!; </u> } | ||
|
||
X:template = "para" { <p> !!; </p> } | ||
X:template = "list[@type='bullet']" { <ul> !!; </ul> } | ||
X:template = "list[@type='enum']" { <ol> !!; </ol> } | ||
X:template = "listitem" { <li> !!; </li> } | ||
|
||
X:template = "value" { <i> !!; </i> } | ||
X:template = "argument" { <code><i> !!; </i></code> } | ||
X:template = "parameter" { <code> !!; </code> } | ||
X:template = "value" { <code> !!; </code> } | ||
|
||
X:template = "var" { <code> !!; </code> } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,51 @@ | ||
X:stylesheet { | ||
|
||
X:template = "directive" { | ||
<a name="{@name}" /> <center><h4> !{@name} </h4></center> | ||
!! "syntax"; | ||
!! "default"; | ||
!! "context"; | ||
!! "para"; | ||
} | ||
|
||
X:template = "syntax" { X:text {syntax: } !!; <br/> } | ||
X:template = "default" { X:text {default: } !!; <br/> } | ||
X:template = "context" { X:text {context: } !!; <br/> } | ||
|
||
|
||
X:template = "directive" { | ||
<hr/> | ||
<a name="{@name}"/> | ||
<!-- <center><h4> !{@name} </h4></center> --> | ||
!! "syntax"; | ||
!! "default"; | ||
!! "context"; | ||
X:if "(@appeared-in)" { | ||
<strong>appeared in version</strong>: !{@appeared-in} | ||
} | ||
!! "para"; | ||
} | ||
|
||
X:template = "syntax" { | ||
X:if "position() = 1" { | ||
<strong>syntax</strong>: | ||
} else { | ||
<code>       </code> | ||
} | ||
<code> !!; </code> <br/> | ||
} | ||
|
||
X:template = "default" { | ||
<strong>default</strong>: | ||
X:if "count(text()) = 0" { | ||
<strong>none</strong> | ||
} else { | ||
<code> !!; </code> | ||
} | ||
<br/> | ||
} | ||
|
||
X:template = "context" { | ||
X:if "position() = 1" { | ||
<strong>context</strong>: | ||
} | ||
X:if "count(text()) = 0" { | ||
<strong>any</strong> | ||
} else { | ||
<code> !!; </code> | ||
} | ||
X:if "position() != last()" { | ||
X:text{, } | ||
} else { | ||
<br/> | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters