From cd7b80a8bb8dd6eb3773e53e2b16441bf1670664 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Mon, 5 Sep 2011 09:32:00 +0000 Subject: [PATCH] DTD and XSLS changes for modules. --- docs/dtd/module.dtd | 80 ++++++++++++++++++++++++++++++++-------- docs/xsls/content.xsls | 61 ++++++++++++++++++++++-------- docs/xsls/directive.xsls | 62 ++++++++++++++++++++++++------- docs/xsls/module.xsls | 4 +- 4 files changed, 160 insertions(+), 47 deletions(-) diff --git a/docs/dtd/module.dtd b/docs/dtd/module.dtd index 102ce68a0..c6e89dc6c 100644 --- a/docs/dtd/module.dtd +++ b/docs/dtd/module.dtd @@ -1,24 +1,72 @@ - - + - - + - - + + - - - + - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/xsls/content.xsls b/docs/xsls/content.xsls index cf9dcf5b6..265107995 100644 --- a/docs/xsls/content.xsls +++ b/docs/xsls/content.xsls @@ -1,19 +1,48 @@ X:stylesheet { -X:template = "section[@name and @title]" { -

!{@title}

- !!; -} - -X:template = "section[not(@name) and @title]" { -

!{@title}

- !!; -} - -X:template = "section[not(@name) and not(@title)]" { !!; } - -X:template = "para" {

!!;

} - -X:template = "value" { !!; } - + X:template = "section[@id and @name]" { +

!{@name}

+ !!; + } + + X:template = "section[not(@id) and @name]" { +

!{@name}

+ !!; + } + + X:template = "section[not(@id) and not(@name)]" { !!; } + + X:template = "para" {

!!;

} + + X:template = "c-def" { !!; } + + X:template = "c-func" { !!; X:text{()} } + + X:template = "code" { !!; } + + X:template = "command" { !!; } + + X:template = "example" {
 !!; 
} + + X:template = "emphasis" { !!; } + + X:template = "header" { !!; } + + X:template = "http-error" { + X:text{"} !{@text} X:text{"} + X:text{ (} !{@code} X:text{)} + } + + X:template = "link[@id and not(@doc)]" {
!!; } + X:template = "link" { !!; } + + X:template = "list[@type='bullet']" { } + X:template = "list[@type='enum']" {
    !!;
} + X:template = "listitem" {
  • !!;
  • } + + X:template = "argument" { !!; } + X:template = "parameter" { !!; } + X:template = "value" { !!; } + + X:template = "var" { !!; } } diff --git a/docs/xsls/directive.xsls b/docs/xsls/directive.xsls index 09bb834fd..0aad575c1 100644 --- a/docs/xsls/directive.xsls +++ b/docs/xsls/directive.xsls @@ -1,15 +1,51 @@ X:stylesheet { - -X:template = "directive" { -

    !{@name}

    - !! "syntax"; - !! "default"; - !! "context"; - !! "para"; -} - -X:template = "syntax" { X:text {syntax: } !!;
    } -X:template = "default" { X:text {default: } !!;
    } -X:template = "context" { X:text {context: } !!;
    } - + + X:template = "directive" { +
    +
    + + !! "syntax"; + !! "default"; + !! "context"; + X:if "(@appeared-in)" { + appeared in version: !{@appeared-in} + } + !! "para"; + } + + X:template = "syntax" { + X:if "position() = 1" { + syntax: + } else { +         + } + !!;
    + } + + X:template = "default" { + default: + X:if "count(text()) = 0" { + none + } else { + !!; + } +
    + } + + X:template = "context" { + X:if "position() = 1" { + context: + } + X:if "count(text()) = 0" { + any + } else { + !!; + } + X:if "position() != last()" { + X:text{, } + } else { +
    + } + } + } diff --git a/docs/xsls/module.xsls b/docs/xsls/module.xsls index 17b28ebe3..79173825c 100644 --- a/docs/xsls/module.xsls +++ b/docs/xsls/module.xsls @@ -10,7 +10,7 @@ X:strip-space elements = "*"; --> X:param XML = "'../xml'"; -X:var LINK = "/module/@link"; +X:var ID = "/module/@id"; X:include href = "directive.xslt"; X:include href = "content.xslt"; @@ -19,7 +19,7 @@ X:include href = "content.xslt"; X:template = "/module" { - !{@title} + !{@name}