Schemas/SMIL
From Code Synthesis Wiki
Revision as of 14:19, 2 August 2007 Boris (Talk | contribs) (Remove deprecated options) ← Previous diff |
Current revision Boris (Talk | contribs) (Fix incorrect anonymous type regex) |
||
Line 1: | Line 1: | ||
This page contains information on using the [http://www.w3.org/TR/2005/REC-SMIL2-20050107/ SMIL 2.0] schemas with XSD. | This page contains information on using the [http://www.w3.org/TR/2005/REC-SMIL2-20050107/ SMIL 2.0] schemas with XSD. | ||
- | SMIL 2.0 schemas have a pathological circular dependency between smil20.xsd and smil20-language.xsd which prevent XSD from sucessefully translating this schemas. This however is fairly easy to overcome by splitting involved files into several parts. The resulting schemas are semantically equivalent to the original. | + | SMIL 2.0 schemas have a pathological circular dependency between smil20.xsd and smil20-language.xsd which prevent XSD from sucessefully translating this schemas in the default, file-per-schema mode. There are two ways to resolve this issue. |
+ | |||
+ | The first approach requires the use of the file-per-type compilation mode which was introduced in XSD 3.1.0. For more information about the file-per-type mode see this [http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ blog post]. | ||
+ | |||
+ | The second approach involves splitting involved files into several parts. The resulting schemas are semantically equivalent to the original. | ||
The following two packages contain the official SMIL 2.0 schemas with circular dependencies removed by introducing several <code>-base</code> files: | The following two packages contain the official SMIL 2.0 schemas with circular dependencies removed by introducing several <code>-base</code> files: | ||
Line 8: | Line 12: | ||
* [[Media:Smil-2.0-schemas-split.zip|smil-2.0-schemas-split.zip]] | * [[Media:Smil-2.0-schemas-split.zip|smil-2.0-schemas-split.zip]] | ||
- | The following options are recommended to compile the SMIL schemas (replace ' with " on Windows): | + | The following options are recommended to compile the SMIL schemas: |
--generate-polymorphic | --generate-polymorphic | ||
--namespace-map "http://www.w3.org/1999/02/22-rdf-syntax-ns#=rdf" | --namespace-map "http://www.w3.org/1999/02/22-rdf-syntax-ns#=rdf" | ||
- | --anonymous-regex '/.* transitionFilterPrototype/calcMode2/' | + | --anonymous-regex "%.* transitionFilterPrototype/calcMode%calcMode2%" |
You should also consider using the --root-element-* options to select for which root elements you need parsing and serialization functions. | You should also consider using the --root-element-* options to select for which root elements you need parsing and serialization functions. |
Current revision
This page contains information on using the SMIL 2.0 schemas with XSD.
SMIL 2.0 schemas have a pathological circular dependency between smil20.xsd and smil20-language.xsd which prevent XSD from sucessefully translating this schemas in the default, file-per-schema mode. There are two ways to resolve this issue.
The first approach requires the use of the file-per-type compilation mode which was introduced in XSD 3.1.0. For more information about the file-per-type mode see this blog post.
The second approach involves splitting involved files into several parts. The resulting schemas are semantically equivalent to the original.
The following two packages contain the official SMIL 2.0 schemas with circular dependencies removed by introducing several -base
files:
The following options are recommended to compile the SMIL schemas:
--generate-polymorphic --namespace-map "http://www.w3.org/1999/02/22-rdf-syntax-ns#=rdf" --anonymous-regex "%.* transitionFilterPrototype/calcMode%calcMode2%"
You should also consider using the --root-element-* options to select for which root elements you need parsing and serialization functions.