Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About gr4tzy

  • Rank
  1. gr4tzy

    enumeration values

    ok, i found out:it takes 2 steps:first you have to define a key for the states like this:<xs:key name="any_name"><xs:selector xpath=".//STATE"/><xs:field xpath="@Name"/></xs:key>then you need to define a reference to that key:<xs:keyref name="any_other_name" refer="xi:any_name"><xs:selector xpath="the path of the element containing the 'enumerated' values"><xs:field="@AnAttribute or element"></xs:keyref>Note that this isn't really a simple type enumeration and i dont know if it works for all applications (it wors for mine).The attribute or element that refers to the @Name attribute does not need be defined as enumeration values.For example if you want that the attribute @Value of the element NEW_STATE to contain a list of all @Name attributes, it's enough to write:<xs:attribute name="Value"/>and nothing morefor further information visit http://www.xml.com/pub/a/2000/11/29/schema...rt1.html?page=6
  2. gr4tzy

    enumeration values

    hello,i'm working on a code generator for state machines and i need to define an attribute as a simple type enumeration but i want to get the values from an xml document. For example, if this is the xml doc:<STATES> <STATE Name="LIGHTS_ON"/> <STATE Name="LIGHTS_OFF"/></STATES>I need to use the Name attributes an enumeration values in an xsd schema.is that possible? if not, pls give some similar ideas.i've tried different xpath expression but it doesn't seem to work.
  • Create New...