1 default namespace = "http://genshi.edgewall.org/"
\r
2 namespace py = "http://genshi.edgewall.org/"
\r
4 include "xinclude.rnc"
\r
6 # There's no way to just match the text part against a Genshi Python expression
\r
7 # See: http://relaxng.org/compact-tutorial-20030326.html#id2814737
\r
8 python.expression = text
\r
10 genshi.expr-type = xsd:string { minLength = "1" }
\r
11 genshi.xpath-type = xsd:anyURI
\r
14 attribute py:if { genshi.expr-type }?,
\r
15 attribute py:choose { text }?,
\r
16 attribute py:when { genshi.expr-type }?,
\r
17 attribute py:otherwise { text }?,
\r
18 attribute py:for { genshi.expr-type }?,
\r
19 attribute py:def { genshi.expr-type }?,
\r
20 attribute py:match { genshi.xpath-type}?,
\r
21 attribute py:with { genshi.expr-type }?,
\r
22 attribute py:attrs { genshi.expr-type }?,
\r
23 attribute py:content { text }?,
\r
24 attribute py:replace { genshi.expr-type }?,
\r
25 attribute py:strip { text }?
\r
27 genshi.if.attlist = attribute test { genshi.expr-type }
\r
28 genshi.choose.attlist = attribute test { text }
\r
29 genshi.when.attlist = attribute test { genshi.expr-type }
\r
30 genshi.for.attlist = attribute each { genshi.expr-type }
\r
31 genshi.def.attlist = attribute function { genshi.expr-type }
\r
32 genshi.with.attlist = attribute vars { genshi.expr-type }
\r
33 genshi.replace.attlist = attribute value { genshi.expr-type }
\r
34 genshi.match.attlist =
\r
35 attribute path { genshi.xpath-type },
\r
36 attribute buffer { "true" | "false" }?,
\r
37 attribute once { "true" | "false" }?,
\r
38 attribute recursive { "true" | "false" }?
\r
41 element py:choose { genshi.choose.attlist,
\r
45 element py:when { genshi.when.attlist,
\r
49 element py:otherwise {
\r
53 element py:if { genshi.if.attlist,
\r
57 element py:for { genshi.for.attlist,
\r
61 element py:def { genshi.def.attlist,
\r
65 element py:with { genshi.with.attlist,
\r
69 element py:match { genshi.match.attlist,
\r
73 element py:replace { genshi.replace.attlist,
\r
77 genshi.allowed.children = text
\r
79 genshi.class = genshi.if | genshi.choose | genshi.when | genshi.otherwise
\r
80 | genshi.for | genshi.def | genshi.with | genshi.match | genshi.replace
\r
84 genshi.model = genshi.class* | genshi.allowed.children*