File: annotations.rnc

package info (click to toggle)
rnc2rng 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: python: 926; makefile: 10; sh: 7
file content (57 lines) | stat: -rw-r--r-- 1,223 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
namespace x = "http://www.example.com"
namespace dc = "http://purl.org/dc/elements/1.1/"
namespace sch = "http://www.ascc.net/xml/schematron"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

x:entity [ name="picture" systemId="picture.jpg" notation="jpg" ]
dc:title [ "Foo without contents & escaped" ]
sch:ns [ uri = "http://purl.org/dc/elements/1.1" prefix = "dc" ]
sch:pattern [
  name = "Some thing & other"
  sch:rule [
    context = "//foo"
    sch:assert [
      test = "@bar = /@bar"
      "attrib matches top-level attribute"
    ]
  ]
  sch:rule [
    context = "//barfoo"
    sch:assert [
      test = "@quick = @fast"
      "tautology of speediness"
    ]
  ]
  "one literal & next:"
  "two literal"
]

[
  a:documentation [
    dc:title [ "schema starts here" ]
  ]
]
div {
  foo = element foo {
    [ a:defaultValue = "1.0" ] attribute version { "1.0" }
  }
}

start = foo

## documentation for definition
##     indented continuation on the next line
## # subheading with leading # (perhaps markdown-style head)
bar = element bar { empty }

baz = element baz {
  ## documentation for a group
  (
    foo,
    ## documentation for a ref
    bar
  )
}

## combining definition
baz |= empty