Everything posted by gr4tzy
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 elemen
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.