Jeff Hooker wrote: > > I'm building a css interface for an IP-XACT schema. As a part of the schema, > users define STATE elements in one part of an XML file and then reuse the > values of the STATE elements as attribute values in another part of the file. > I can use XML Schema keyref function to validate the dynamic content (STATE > names) but they're still having to type the state names in manually, which is > error prone. > > Is there any way of using CSS + XMLmind's xpath command to populate a > drop-down list with content generated from an XML file? >
Yes. [1] Write a macro-command which: [a] Invokes <get> to collect the STATE values. See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpath_get.html Use XPath extension function join() to join the collected values using a space character: See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpathextfunc.html [b] Invokes command pick to let the user choose a value. See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/pick.html [c] Invokes command putAttribute to add or change the attribute value. See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/putAttribute.html [2] Modify your CSS to embed command-buttons in the styled document view. Such command-buttons invoke the above macro. See http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/command-button.html

