[libvirt] [PATCH] Replace <optional><oneOrMore> with <zeroOrMore>.

The two syntax should be equivalent, but the former creates, with trang, an invalid Relax-NG Compact form file, as the output will contain the sequence "+?" which is not recognized by tools like rnv. --- docs/schemas/domain.rng | 40 +++++++++++++++++++--------------------- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 5b8f7f8..d1d3efb 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -980,27 +980,25 @@ </attribute> </define> <define name="qemucdevSrcDef"> - <optional> - <oneOrMore> - <element name="source"> - <optional> - <attribute name="mode"/> - </optional> - <optional> - <attribute name="path"/> - </optional> - <optional> - <attribute name="host"/> - </optional> - <optional> - <attribute name="service"/> - </optional> - <optional> - <attribute name="wiremode"/> - </optional> - </element> - </oneOrMore> - </optional> + <zeroOrMore> + <element name="source"> + <optional> + <attribute name="mode"/> + </optional> + <optional> + <attribute name="path"/> + </optional> + <optional> + <attribute name="host"/> + </optional> + <optional> + <attribute name="service"/> + </optional> + <optional> + <attribute name="wiremode"/> + </optional> + </element> + </zeroOrMore> <optional> <element name="protocol"> <optional> -- 1.6.5.5

On Thu, Dec 10, 2009 at 05:18:15PM +0100, Diego Elio 'Flameeyes' Pettenò wrote:
The two syntax should be equivalent, but the former creates, with trang, an invalid Relax-NG Compact form file, as the output will contain the sequence "+?" which is not recognized by tools like rnv. --- docs/schemas/domain.rng | 40 +++++++++++++++++++--------------------- 1 files changed, 19 insertions(+), 21 deletions(-)
Well, that's really a trang bug and should be reported, but the workaround is fine, applied, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Diego Elio 'Flameeyes' Pettenò