Correct example of using custom classes in XRC schema comments.

Include the required namespaces declarations.

Also fix a syntax error in the example (s/,/&/) and show an example attribute
definition.
This commit is contained in:
Vadim Zeitlin
2015-04-07 14:42:15 +02:00
parent 72cba11aa2
commit ca42b4a686

View File

@@ -24,6 +24,9 @@
# #
# You can also add validation for custom classes: # You can also add validation for custom classes:
# #
# default namespace = "http://www.wxwidgets.org/wxxrc"
# namespace xrc = "http://www.wxwidgets.org/wxxrc"
#
# include "xrc_schema.rnc" { # include "xrc_schema.rnc" {
# customClasses = myExtensionClasses # customClasses = myExtensionClasses
# } # }
@@ -31,8 +34,9 @@
# myExtensionClasses = (MyFoo | MyBar | ...) # myExtensionClasses = (MyFoo | MyBar | ...)
# MyFoo = # MyFoo =
# element object { # element object {
# attribute class { "MyFoo" }, # attribute class { "MyFoo" } &
# stdObjectNodeAttributes, # stdObjectNodeAttributes &
# [xrc:p="o"] element myElem {_, t_text }*
# ... # ...
# } # }
# ... # ...