OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] UML-to-RNG?

I plead guilty to using UML (not strictly, since there was no requirement for OOD)
to model a markup language, OASIS TAML (Test Assertion Markup Language)[1]
- the model is found at
- the markup is in a separate spec at
(it's all due for public review, by the way, on the way, hopefully to becoming
an OASIS standard, subject to the process and vote of course)
and the technical committee (after I left, as it happened) were persuaded to
use RelaxNG Compact to define inline the elements of the markup in the spec
(even though there was also a normative XSD schema for the markup).
To be honest though, there are a few divergences from your described
(perhaps idealised) process of going from UML to RNG:
1. I think the TC didn't actually generate the RNG from the UML
2. there was an intermediary stage in that the UML is good for diagrams
but we had to devise our own textual formal definitions based on the UML
prescription {
content : string (0..1)
level : string (0..1) (allowed values include: mandatory|preferred|
I based this initially on a text representation syntax of UML by Martin Fowler.
This nicely converts to RelaxNG but I'm not sure exactly how the TC did it.
e.g the above could have the corresponding RNG(compact):
element taml:prescription { prescription_def }
prescription_def =
attribute level { "mandatory" | "preferred" | "permitted" }?,
attribute * - taml:* { text }*,
You'd see from the markup spec though that the end result XSD schema
for this 'prescription' element is
1. a lot more complex and
2. not very much like the UML (well, our text representation of the UML)
<xs:element name="prescription" type="prescription_type" minOccurs="0"/>
<xs:complexType name="prescription_type">
<xs:extension base="xs:normalizedString">
<xs:attribute name="level" type="prescriptionLevelCode_type"/>
<xs:anyAttribute namespace="##other" processContents="skip"/>
<xs:simpleType name="prescriptionLevelBaseCode_type">
<xs:restriction base="xs:normalizedString">
<xs:enumeration value="mandatory"/>
<xs:enumeration value="permitted"/>
<xs:enumeration value="preferred"/>
<xs:simpleType name="prescriptionLevelCode_type">
<xs:union memberTypes="prescriptionLevelBaseCode_type
<xs:simpleType name="prescriptionLevelBaseCode_type">
<xs:restriction base="xs:normalizedString">
<xs:enumeration value="mandatory"/>
<xs:enumeration value="permitted"/>
<xs:enumeration value="preferred"/>
[1] see http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=tag 
Stephen D Green

2011/6/15 Piotr Bański <bansp@o2.pl>
Hi All,

With apologies to those who participate in the RNG-Users list, I would
like to repeat here a question that has yielded no answers there for
nearly two weeks -- something that may obviously suggest that the matter
is closed, but I'd love to make sure that I haven't missed any leads.

It just seems a pity not to see any competition, and consequently no
option to choose, between RELAX NG and XML Schema as far as the
serialization of UML models is concerned. I'd be very curious to know if
the reason is principled or maybe rather of the "just because" sort.



-------- Original Message --------
Subject: [rng-users] UML-to-RNG
Date: Thu, 02 Jun 2011 22:43:49 +0200

Hello All,

I've been wondering: whenever I seem to read about UML models getting
mapped to XML, the target is either an instance, or XSD.

Both James Clark [1] and Eric van der Vlist [2] mention that RNG appears
to be a good[1]/perfect[2] target for mapping from UML, much better than

[1]: http://www.thaiopensource.com/relaxng/design.html
[2]: http://books.xmlschemata.org/relaxng/relax-CHP-14-SECT-3.html

And hence my question: has anyone actually employed this kind of mapping
and if so, may I please have a reference to a report on that or a link
to a live project that uses UML->RNG mapping? Tried googling, failed...

Many thanks in advance,



XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS