This example is a translation from the XML Schema presented in the developerWorks post on creating maintainable and extensible XML formats. It is from the section "Design a more general format". This is RELAX NG Compact Notation:
default namespace = "http://car.org/car"
namespace tr = "http://car.org/tire"
namespace wnd = "http://car.org/windscreen"
start =
element car {
element brand { text },
element type { text },
element kind { text },
(element tr:tire {
attribute tr:count { xsd:integer },
element tr:brand { text },
element tr:type { text }
}
| element wnd:windscreen {
attribute wnd:count { xsd:integer },
element wnd:brand { text }
})+
}
0 reacties:
Post a Comment