[ http://issues.apache.org/jira/browse/XAP-129?page=all ]

Scott Boyd updated XAP-129:
---------------------------

    Description: 
using Xpath to grab the id attribute of an element in a DDS,  an auto generated 
element ID is automatically bound if one is not provided. ex - 
xap:432434232323-4

A work around for this is to have id as a child element and have the id value 
in the text attribute.



XML DATA*********
<employees>
                <employee id="232"  fname="Jeanne" lname="Doe" />
                <employee fname="Mary" lname="Roe" />
                <employee  lname="Chakravarti" />
                <employee fname="Arne" lname="Sachnussen"/>
                <employee fname="Manny" lname="Fein" />
</employees>
XAL***************
<xal:table id="testComponent" width="750px" height="400px">
                    <xal:column>
                        <xal:header  width="180px" text="id" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <xal:column>
                        <xal:header width="180px" text="Last name" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <xal:column>
                        <xal:header width="180px" text="First name" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <xal:column>
                        <xal:header width="180px" text="Middle name" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <!-- Iterator -->
                    <iterator xmlns="http://www.openxal.org/data"; 
name="anIterator" dataSource="myDataSource" select="//employee" type="ONE_TIME">
                        <xal:row>
                            <xal:cell text="{*('@id')}" fontFamily="Garamond" 
fontSize="11pt"/>
                           
                           
                            <xal:cell text="{*('@fname')}" 
fontFamily="Garamond" fontSize="11pt"/>
                            <xal:cell text="{*('@mname')}" 
fontFamily="Garamond" fontSize="11pt"/>                                         
     
                        </xal:row>
                    </iterator>
                </xal:table>
                


  was:

using Xpath to grab the id attribute of an element in a DDS,  an auto generated 
element ID is automatically bound if one is not provided. ex - 
xap:432434232323-4

A work around for this is to have id as a child element and have the id value 
in the text attribute.



XML DATA*********
<employees>
                <employee id="232"  fname="Jeanne" lname="Doe" />
                <employee fname="Mary" lname="Roe" />
                <employee  lname="Chakravarti" />
                <employee fname="Arne" lname="Sachnussen"/>
                <employee fname="Manny" lname="Fein" />
</employees>
XAL***************
<xal:table id="testComponent" width="750px" height="400px">
                    <xal:column>
                        <xal:header  width="180px" text="id" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <xal:column>
                        <xal:header width="180px" text="Last name" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <xal:column>
                        <xal:header width="180px" text="First name" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <xal:column>
                        <xal:header width="180px" text="Middle name" 
fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
                    </xal:column>
                    <!-- Iterator -->
                    <iterator xmlns="http://www.openxal.org/data"; 
name="anIterator" dataSource="myDataSource" select="//employee" type="ONE_TIME">
                        <xal:row>
                            <xal:cell text="{*('@id')}" fontFamily="Garamond" 
fontSize="11pt"/>
                           
                           
                            <xal:cell text="{*('@fname')}" 
fontFamily="Garamond" fontSize="11pt"/>
                            <xal:cell text="{*('@mname')}" 
fontFamily="Garamond" fontSize="11pt"/>                                         
     
                        </xal:row>
                    </iterator>
                </xal:table>
                


       Priority: Minor  (was: Major)

> Data Binding: documentDataSource: auto generated element IDs are bound if one 
> is not provided for Xpath query
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: XAP-129
>                 URL: http://issues.apache.org/jira/browse/XAP-129
>             Project: XAP
>          Issue Type: Bug
>          Components: Data Binding
>            Reporter: Matt Carbone
>            Priority: Minor
>
> using Xpath to grab the id attribute of an element in a DDS,  an auto 
> generated element ID is automatically bound if one is not provided. ex - 
> xap:432434232323-4
> A work around for this is to have id as a child element and have the id value 
> in the text attribute.
> XML DATA*********
> <employees>
>               <employee id="232"  fname="Jeanne" lname="Doe" />
>               <employee fname="Mary" lname="Roe" />
>               <employee  lname="Chakravarti" />
>               <employee fname="Arne" lname="Sachnussen"/>
>               <employee fname="Manny" lname="Fein" />
> </employees>
> XAL***************
> <xal:table id="testComponent" width="750px" height="400px">
>                     <xal:column>
>                         <xal:header  width="180px" text="id" 
> fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
>                     </xal:column>
>                     <xal:column>
>                         <xal:header width="180px" text="Last name" 
> fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
>                     </xal:column>
>                     <xal:column>
>                         <xal:header width="180px" text="First name" 
> fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
>                     </xal:column>
>                     <xal:column>
>                         <xal:header width="180px" text="Middle name" 
> fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
>                     </xal:column>
>                     <!-- Iterator -->
>                     <iterator xmlns="http://www.openxal.org/data"; 
> name="anIterator" dataSource="myDataSource" select="//employee" 
> type="ONE_TIME">
>                         <xal:row>
>                             <xal:cell text="{*('@id')}" fontFamily="Garamond" 
> fontSize="11pt"/>
>                            
>                            
>                             <xal:cell text="{*('@fname')}" 
> fontFamily="Garamond" fontSize="11pt"/>
>                             <xal:cell text="{*('@mname')}" 
> fontFamily="Garamond" fontSize="11pt"/>                                       
>      
>                         </xal:row>
>                     </iterator>
>                 </xal:table>
>                 

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

        

Reply via email to