examples/rest
Stylesheet reststyle.xsl
examples/rest/reststyle.xsl
- Stylesheet
reststyle.xsl
XSLT version 1.0
includes testa.xsl, testb.xsl, testc.xsl
namespace-alias
-
stylesheet-prefix
test="testuri"
, result-prefixxsl="http://www.w3.org/1999/XSL/Transform"
-
stylesheet-prefix
test2="testuri2"
, result-prefixtest="testuri"
output
-
encoding="UTF-8"
-
indent="yes"
-
method="xml"
-
omit-xml-declaration="yes"
-
standalone="no"
preserve-space for elements "some
"
strip-space for elements "test | test2
"
par1 - default value: 1
|
comment for param par1 with select="1"
|
par2 - default value:
|
comment for param 3 with no default
|
par2 - default value: 2
|
comment for param 2 with content 2
|
var1 = 1
|
comment for variable var1 with value 1
|
var2 =
|
comment for variable var2 with no default
|
var3 = 3
|
comment for variable var 3
|
name1
|
comment for decimal formatter1
|
name2
|
comment for decimal formatter2
|
n
|
comment for key 1
|
n2
|
comment for key 2
|
as1
|
comment for this attribute set
|
as2
|
insert-comment(TEST1, TEST2)
|
comment for insert-comment tpl
|
mall
mode="mode12"
priority="2"
|
match template with everything
|
melement
|
match template without params, mode, priority
|
mnall
mode="mode1"
priority="5"
|
match and named template with everything
|
mnelement
|
match/named template without params, mode, priority
|
mnpelement
priority="1"
|
match/named template without params, mode
|
mnpmelement
mode="m1"
priority="1"
|
match/named template without params
|
mpelement
priority="1"
|
match template without params, mode
|
mpmelement
mode="m1"
priority="1"
|
match template without params
|
nall(t1, t2, t3)
mode="x"
priority="3"
|
named template with everything
|
nelement()
|
named template without params, mode, priority
|
npelement()
priority="1"
|
named template without params, mode
|
npmelement()
mode="m1"
priority="1"
|
named template without params
|
sorted()
|
test if sorted right in summary
|
sorted
|
test if sorted right in summary
|
sorted
mode="1"
|
test if sorted right in summary
|
sorted
mode="2"
|
test if sorted right in summary
|
sorted()
mode="2"
|
test if sorted right in summary
|
sorted
mode="1"
priority="1"
|
test if sorted right in summary
|
sorted
mode="5"
priority="1"
|
test if sorted right in summary
|
sorted
priority="3"
|
test if sorted right in summary
|
sorted
priority="5"
|
test if sorted right in summary
|
sorted
mode="5"
priority="6"
|
test if sorted right in summary
|
xsl:key | xsl:decimal-format | xsl:output | xsl:strip-space | xsl:preserve-space
|
comment for tpl xsl:key | xsl:decimal-format | xsl:output | xsl:strip-space | xsl:preserve-space
|
xsl:param | xsl:variable
|
comment for param/variable tpl
|
Param Detail
par1
default value:
1
comment for param par1 with select="1"
par2
comment for param 3 with no default
par2
default value:
2
comment for param 2 with content 2
Variable Detail
var2
var2
=
comment for variable var2 with no default
var3
var3
=
3
comment for variable var 3
var1
var1
=
1
comment for variable var1 with value 1
Decimal Format Detail
name2
NaN |
NaN
|
---|---|
decimal-separator |
.
|
name |
name2
|
pattern-separator |
;
|
per-mille |
‰
|
percent |
%
|
zero-digit |
0
|
comment for decimal formatter2
name1
NaN |
NaN
|
---|---|
decimal-separator |
,
|
digit |
#
|
grouping-separator |
.
|
infinity |
Inf
|
minus-sign |
-
|
name |
name1
|
pattern-separator |
;
|
per-mille |
‰
|
percent |
%
|
zero-digit |
0
|
comment for decimal formatter1
Key Detail
n2
matches: m2
uses: u2
comment for key 2
n
matches: m
uses: u
comment for key 1
Attribute Set Detail
as1
-
a1=x
-
a2=
comment for this attribute set
as2
-
a1=x
-
a2=y
Template Detail
sorted
matches: "sorted"
mode: "1"
test if sorted right in summary
sorted
matches: "sorted"
mode: "2"
test if sorted right in summary
sorted()
name: "sorted"
test if sorted right in summary
sorted
matches: "sorted"
test if sorted right in summary
sorted
matches: "sorted"
priority: "5"
test if sorted right in summary
sorted
matches: "sorted"
mode: "5"
priority: "1"
test if sorted right in summary
sorted()
name: "sorted"
mode: "2"
test if sorted right in summary
sorted
matches: "sorted"
mode: "1"
priority: "1"
test if sorted right in summary
sorted
matches: "sorted"
mode: "5"
priority: "6"
test if sorted right in summary
sorted
matches: "sorted"
priority: "3"
test if sorted right in summary
melement
matches: "melement"
match template without params, mode, priority
does nothing
nelement()
name: "nelement"
named template without params, mode, priority
does nothing
mnelement
nmelement()
matches: "mnelement"
name: "nmelement"
match/named template without params, mode, priority
does nothing
mpelement
matches: "mpelement"
priority: "1"
match template without params, mode
does nothing
npelement()
name: "npelement"
priority: "1"
named template without params, mode
does nothing
mnpelement
nmpelement()
matches: "mnpelement"
name: "nmpelement"
priority: "1"
match/named template without params, mode
does nothing
mpmelement
matches: "mpmelement"
mode: "m1"
priority: "1"
match template without params
does nothing
npmelement()
name: "npmelement"
mode: "m1"
priority: "1"
named template without params
does nothing
mnpmelement
nmpmelement()
matches: "mnpmelement"
name: "nmpmelement"
mode: "m1"
priority: "1"
match/named template without params
does nothing
mall
matches: "mall"
mode: "mode12"
priority: "2"
match template with everything
does nothing
parameters
-
t1
default value:
default in content
the default value is stated as content of the xsl:param element
-
t2
default value:
default in select
the default value is stated in the select attribute of the xsl:param element
-
t3
no default value given but instead comment about that given here
nall(t1, t2, t3)
name: "nall"
mode: "x"
priority: "3"
named template with everything
does nothing
parameters
-
t1
default value:
default in content
-
t2
default value:
default in select
-
t3
mnall
nmall(t1, t2, t3)
matches: "mnall"
name: "nmall"
mode: "mode1"
priority: "5"
match and named template with everything
does nothing
parameters
-
t1
default value:
default in content
-
t2
default value:
default in select
-
t3
no default
xsl:key | xsl:decimal-format | xsl:output | xsl:strip-space | xsl:preserve-space
matches: "xsl:key | xsl:decimal-format | xsl:output | xsl:strip-space | xsl:preserve-space"
comment for tpl xsl:key | xsl:decimal-format | xsl:output | xsl:strip-space | xsl:preserve-space
xsl:param | xsl:variable
matches: "xsl:param | xsl:variable"
comment for param/variable tpl
insert-comment(TEST1, TEST2)
name: "insert-comment"
comment for insert-comment tpl
parameters
-
TEST1
default value:
value
param TEST 1 comment
-
TEST2
default value:
value
param TEST 2 comment
restructuredText style comments
non ASCII characters should work in comments (öäüÜÖÄß), pyXSLdoc normally assumes UTF-8 documents
"quots" too?
this stylesheet does not work for anything, just shows comment examples!