Is the behavior of XmlMind's putAttribute function sensible for attributes
of type ID? If no value is specified, then a select box dialog is displayed
that allows you to select from a list of existing ID values. This is
obviously the correct behavior for IDREF attributes, but surely the point
when inserting an ID attribute is to insert a unique value that has not yet
been used?
 
I am currently using version 3.0 of XmlMind.
 
Do you have a workaround that lets me display a standard "prompt" dialog for
a newly inserted element only if it has an attribute called "id"? I tried
this, but it doesn't seem to work, for reasons I don't understand:
 
  <cfg:command name="my.insert">
    <cfg:macro trace="true">
      <cfg:sequence>
        <cfg:command name="insert" parameter="%0" />
        <cfg:choice>
          <cfg:sequence>
            <cfg:match context="$selectedElement" pattern="@id"/>
            <cfg:command name="prompt" parameter="'Insert Element' 'Enter
element ID:'" />
            <cfg:command name="putAttribute" parameter="[implicitElement] id
'%_'" />
          </cfg:sequence>
        </cfg:choice>
      </cfg:sequence>
    </cfg:macro>
  </cfg:command>

 
Kevin Flynn
Birdstep Technology ASA
Oslo, Norway
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060220/bd5dad6e/attachment.htm
 

Reply via email to