# HG changeset patch # User Igor Sysoev # Date 1317388401 0 # Node ID 2bcfb5f75e06ee038d1d2b72dde0f8865fda1357 # Parent dc74e3a8f324200fc5047460e4e33195a5e1baa3 Supporting new format of and
: and
Old format should be eventually removed. diff --git a/xsls/body.xsls b/xsls/body.xsls --- a/xsls/body.xsls +++ b/xsls/body.xsls @@ -11,7 +11,7 @@ X:template body (lang) {

- !{@title} X:if "$YEAR" { X:text{: } !{$YEAR} } + !{@name | @title} X:if "$YEAR" { X:text{: } !{$YEAR} }

@@ -29,8 +29,14 @@ X:template body (lang) {
- X:for-each "section[@name]" { - !{@title}
+ X:if "section[@id]" { + X:for-each "section[@id]" { + !{@name}
+ } + } else { + X:for-each "section[@name]" { + !{@title}
+ } }
diff --git a/xsls/content.xsls b/xsls/content.xsls --- a/xsls/content.xsls +++ b/xsls/content.xsls @@ -1,5 +1,19 @@ X:stylesheet { + 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 = "section[@name and @title]" {

!{@title}

!!; @@ -12,6 +26,8 @@ X:stylesheet { X:template = "section[not(@name) and not(@title)]" { !!; } + + X:template = "para" {

!!;

} X:template = "item/para" {

!!;

} diff --git a/xsls/link.xsls b/xsls/link.xsls --- a/xsls/link.xsls +++ b/xsls/link.xsls @@ -31,8 +31,10 @@ X:template = "a[starts-with(@href, '/') |document(concat($XML, @href))/module/@link) } } } - !{ document(concat($XML, @href))/article/@title - |document(concat($XML, @href))/module/@title } + !{ document(concat($XML, @href))/article/@title + |document(concat($XML, @href))/article/@name + |document(concat($XML, @href))/module/@title + |document(concat($XML, @href))/module/@name }
}