Xmodify: Elements in xModify can't have same ID as elements in UI document
--------------------------------------------------------------------------

                 Key: XAP-270
                 URL: https://issues.apache.org/jira/browse/XAP-270
             Project: XAP
          Issue Type: Bug
          Components: XModify
            Reporter: Trevor Oldak


If an element in a document is being replaced, the ID for the original object 
cannot be preserved. The macro below would throw an error because the button 
replacing testComponent has the same id. We cannot set the id of an element 
after it has been created. Therefore, there is no way to 'reset' an element 
through a macro, without removing every possible attribute.


        <macro:macro id="resetButton" 
xmlns:macro="http://openxal.org/core/macro";>
                <xm:modifications xmlns:xm="http://openxal.org/core/xmodify";>
                        <xm:replace select="id('testComponent')">
                                <button id="testComponent" text="foo"/>
                        </xm:replace>
                </xm:modifications>
        </macro:macro>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to