diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-18 11:17:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-18 11:17:51 +0200 |
commit | d80d096ee8743fd6f7382d274272b0b6d7faf9bf (patch) | |
tree | d0f0bee1e645cb2b86b6837ac0db8a7d2821e533 /examples/cxx/hybrid/evolution/ignore/transform-v2.xsd | |
parent | 0e4637025fa8d1b4234b0512561d31f0dd023843 (diff) |
Support for schema evolution using substitution groups
New examples: hybrid/evolution/ignore and hybrid/evolution/passthrough.
Diffstat (limited to 'examples/cxx/hybrid/evolution/ignore/transform-v2.xsd')
-rw-r--r-- | examples/cxx/hybrid/evolution/ignore/transform-v2.xsd | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/examples/cxx/hybrid/evolution/ignore/transform-v2.xsd b/examples/cxx/hybrid/evolution/ignore/transform-v2.xsd new file mode 100644 index 0000000..d9ceaec --- /dev/null +++ b/examples/cxx/hybrid/evolution/ignore/transform-v2.xsd @@ -0,0 +1,93 @@ +<?xml version="1.0"?> + +<!-- + +file : examples/cxx/hybrid/evolution/ignore/transform-v2.xsd +author : Boris Kolpackov <boris@codesynthesis.com> +copyright : not copyrighted - public domain + +--> + +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tf="http://www.codesynthesis.com/transform" + targetNamespace="http://www.codesynthesis.com/transform" + elementFormDefault="qualified"> + + <xsd:complexType name="transformation_type" abstract="true"> + <xsd:sequence> + <xsd:element name="description" type="xsd:string"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required"/> + </xsd:complexType> + + <xsd:element name="transformation" type="tf:transformation_type"/> + + <!-- Document root. --> + + <xsd:complexType name="transformations_type"> + <xsd:sequence> + <xsd:element ref="tf:transformation" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:element name="transformations" type="tf:transformations_type"/> + + <!-- Move. --> + + <xsd:complexType name="move_type"> + <xsd:complexContent> + <xsd:extension base="tf:transformation_type"> + <xsd:sequence> + <xsd:element name="x" type="xsd:float"/> + <xsd:element name="y" type="xsd:float"/> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="move-transformation" + type="tf:move_type" + substitutionGroup="tf:transformation"/> + + <!-- Rotate. --> + + <xsd:complexType name="rotate_type"> + <xsd:complexContent> + <xsd:extension base="tf:transformation_type"> + <xsd:sequence> + <xsd:element name="angle" type="xsd:float"/> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="rotate-transformation" + type="tf:rotate_type" + substitutionGroup="tf:transformation"/> + + <!-- Scale. --> + + <xsd:complexType name="ratio_type"> + <xsd:sequence> + <xsd:element name="x" type="xsd:float"/> + <xsd:element name="y" type="xsd:float"/> + </xsd:sequence> + <xsd:attribute name="unit" type="xsd:string"/> + </xsd:complexType> + + <xsd:complexType name="scale_type"> + <xsd:complexContent> + <xsd:extension base="tf:transformation_type"> + <xsd:sequence> + <xsd:element name="ratios" type="tf:ratio_type"/> + </xsd:sequence> + <xsd:attribute name="proportional" type="xsd:boolean"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:element name="scale-transformation" + type="tf:scale_type" + substitutionGroup="tf:transformation"/> + +</xsd:schema> |