From ca42b4a68637ac9c57e511b27f7a2330daf84eb3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Apr 2015 14:42:15 +0200 Subject: [PATCH] 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. --- misc/schema/xrc_schema.rnc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/schema/xrc_schema.rnc b/misc/schema/xrc_schema.rnc index 529831c0d7..894955d6f4 100644 --- a/misc/schema/xrc_schema.rnc +++ b/misc/schema/xrc_schema.rnc @@ -24,6 +24,9 @@ # # 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" { # customClasses = myExtensionClasses # } @@ -31,8 +34,9 @@ # myExtensionClasses = (MyFoo | MyBar | ...) # MyFoo = # element object { -# attribute class { "MyFoo" }, -# stdObjectNodeAttributes, +# attribute class { "MyFoo" } & +# stdObjectNodeAttributes & +# [xrc:p="o"] element myElem {_, t_text }* # ... # } # ...