Jump to content

ninja.1200

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

1 Neutral

About ninja.1200

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Germany
  1. Default namespace works. I had a typo in one namespace declaration. So everything is fine now :)Thanks again!
  2. Thank you very much! I went through the tutorials you mentioned and finally I decided to use substitutionGroups in order to solve my problem. With these groups I can do something like this: <elem attr="anything" /><B:elem attr="value1" /> I can use the element prefix to recognize whether a special attribute value is used or not, even in nested structures. <elem attr="anything"> <child attr="anything" /> <B:child attr="value1" /></elem> The only thing that does not work as intended: for the substituted elements I always have to specify a prefix even if I refer to the general definition in schema A. Actually, the example above only works in this way: <elem attr="anything"> <A:child attr="anything" /> <B:child attr="value1" /></elem> Definition of a default namespace does not help. Any suggestions?
  3. Hi all!I am working on a schema file where I want to use something like inheritance or interfaces (cf. Java), but I don't have any idea how to start. In particular, I would like to realize the following example. In schema A I define the general structure of an entity: <xs:element name="elem" type="xs:string"> <xs:attribute name="attr" type="xs:string" /></xs:element> An instance would look like this: <elem attr="anything" /> In schema B I would like to refine the attribute type mentioned in schema A: ???<xs:attribute name="attr"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="value1" /> <xs:enumeration value="value2" /> </xs:restriction> </xs:simpleType></xs:attribute>??? So that I can decide in an instance if I want to use the general definition or the refined one, e.g. by using a prefix: <elem attr="anything" />or<elem attr="B:value1" /><elem attr="B:value2" /> Basically, I want to put special values for attributes in an external schema file (as kind of a taxonomy) and decide in an instance if I want to use the general definition or the specialzed one. In the general schema I don't want to place anything that is related to the specialized values so that I could define lots of specialized schemas (other taxonomies) without the need to change the general schema. Hope you got my idea.. Does anyone have an idea whether this is possible an how I have to build my schemas and instances to achieve this?Thanks in advance!!!!!
×
×
  • Create New...