URGENT: I'm not able to do insert in an empty xml..

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

URGENT: I'm not able to do insert in an empty xml..

daniele ippoliti
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele








--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: URGENT: I'm not able to do insert in an empty xml..

daniele ippoliti
sorry the second instance is

 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele









--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: URGENT: I'm not able to do insert in an empty xml..

bsteuhl
If you are using sql processor then just define your empty result set in sql:no-results to replace the instance in your model with this empty xml template.
 
If you are doing something else you will have to provide more detail in your question and the actually database you are calling, etc.  You reference i-instance and no where in your model do you show an instance with that id.
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:09:28 AM
Subject: [ops-users] Re: URGENT: I'm not able to do insert in an empty xml..

sorry the second instance is

 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele









--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..

daniele ippoliti

no my scope it's just to retrieve this istance with a macro and from the log it's well imported on the model so I would like simply put the template on this instance


 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 Brian Steuhl <[hidden email]>
If you are using sql processor then just define your empty result set in sql:no-results to replace the instance in your model with this empty xml template.
 
If you are doing something else you will have to provide more detail in your question and the actually database you are calling, etc.  You reference i-instance and no where in your model do you show an instance with that id.
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:09:28 AM
Subject: [ops-users] Re: URGENT: I'm not able to do insert in an empty xml..

sorry the second instance is

 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele









--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..

bsteuhl
Where is your nodeset in your insert?
 
 <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
<xf:insert context="..." nodeset="..."  at=".." position="..." origin=".." />
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:39:55 AM
Subject: [ops-users] Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..


no my scope it's just to retrieve this istance with a macro and from the log it's well imported on the model so I would like simply put the template on this instance


 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 Brian Steuhl <[hidden email]>
If you are using sql processor then just define your empty result set in sql:no-results to replace the instance in your model with this empty xml template.
 
If you are doing something else you will have to provide more detail in your question and the actually database you are calling, etc.  You reference i-instance and no where in your model do you show an instance with that id.
 

Brian Steuhl
Website:http://btmsoftwaresolutions.com/

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:09:28 AM
Subject: [ops-users] Re: URGENT: I'm not able to do insert in an empty xml..

sorry the second instance is

 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele









--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..

daniele ippoliti
why you need nopdeset attribute and how would you set it ??????, I have read this link of IBM

http://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/com.ibm.help.wf.doc/Specification/i_xfdl_g_xforms_actions_xforms_insert.htmlhttp://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/com.ibm.help.wf.doc/Specification/i_xfdl_g_xforms_actions_xforms_insert.html

in particular in bold you can read that I want just to add a new node, a new structure in an XML node (<RefPoints></RefPoints>) and then in red you have the part that seems to say that I can use origin attribute in the case as mine.....

nodeset binding special

defines the node to copy. If multiple nodes match, the last matching node is copied. Also defines where to place the copy - it is placed into the data model as a sibling of this node. Use the nodeset binding if you are copying a node that is already in the table, and are placing the new node in the same table.

If you want to copy a node that is not in the table, use the origin attribute. This overrides the nodeset binding for this purpose.

If you want to place the copy in a table that has no rows, use the context attribute. This lets you point to a parent node rather than a sibling node, and overrides the nodeset binding for this purpose. The new node is create as a child of the context node, and is useful for tables that begin empty. In this case, once the first child is created, the nodeset binding is still used in conjunction with the position and at attributes to determine where additional rows are placed.



2011/4/18 Brian Steuhl <[hidden email]>
Where is your nodeset in your insert?
 
 <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
<xf:insert context="..." nodeset="..."  at=".." position="..." origin=".." />
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:39:55 AM
Subject: [ops-users] Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..


no my scope it's just to retrieve this istance with a macro and from the log it's well imported on the model so I would like simply put the template on this instance


 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 Brian Steuhl <[hidden email]>
If you are using sql processor then just define your empty result set in sql:no-results to replace the instance in your model with this empty xml template.
 
If you are doing something else you will have to provide more detail in your question and the actually database you are calling, etc.  You reference i-instance and no where in your model do you show an instance with that id.
 

Brian Steuhl
Website:http://btmsoftwaresolutions.com/

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:09:28 AM
Subject: [ops-users] Re: URGENT: I'm not able to do insert in an empty xml..

sorry the second instance is

 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele









--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..

daniele ippoliti
and then I have tried also with this insert

<xf:insert context="instance('i-instance')" nodeset="RefPoint" origin="instance('templateRefPoint')"/>

but the strange thing is that the file generated is empty....I don't have anymore also the <RefPints></RefPoints> node that it' supposed to be there...

Daniele

2011/4/18 daniele ippoliti <[hidden email]>
why you need nopdeset attribute and how would you set it ??????, I have read this link of IBM

http://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/com.ibm.help.wf.doc/Specification/i_xfdl_g_xforms_actions_xforms_insert.htmlhttp://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/com.ibm.help.wf.doc/Specification/i_xfdl_g_xforms_actions_xforms_insert.html

in particular in bold you can read that I want just to add a new node, a new structure in an XML node (<RefPoints></RefPoints>) and then in red you have the part that seems to say that I can use origin attribute in the case as mine.....

nodeset binding special

defines the node to copy. If multiple nodes match, the last matching node is copied. Also defines where to place the copy - it is placed into the data model as a sibling of this node. Use the nodeset binding if you are copying a node that is already in the table, and are placing the new node in the same table.

If you want to copy a node that is not in the table, use the origin attribute. This overrides the nodeset binding for this purpose.

If you want to place the copy in a table that has no rows, use the context attribute. This lets you point to a parent node rather than a sibling node, and overrides the nodeset binding for this purpose. The new node is create as a child of the context node, and is useful for tables that begin empty. In this case, once the first child is created, the nodeset binding is still used in conjunction with the position and at attributes to determine where additional rows are placed.



2011/4/18 Brian Steuhl <[hidden email]>
Where is your nodeset in your insert?
 
 <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
<xf:insert context="..." nodeset="..."  at=".." position="..." origin=".." />
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:39:55 AM
Subject: [ops-users] Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..


no my scope it's just to retrieve this istance with a macro and from the log it's well imported on the model so I would like simply put the template on this instance


 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 Brian Steuhl <[hidden email]>
If you are using sql processor then just define your empty result set in sql:no-results to replace the instance in your model with this empty xml template.
 
If you are doing something else you will have to provide more detail in your question and the actually database you are calling, etc.  You reference i-instance and no where in your model do you show an instance with that id.
 

Brian Steuhl
Website:http://btmsoftwaresolutions.com/

Follow BTM on Twitter

Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: daniele ippoliti <[hidden email]>
To: [hidden email]
Sent: Mon, April 18, 2011 5:09:28 AM
Subject: [ops-users] Re: URGENT: I'm not able to do insert in an empty xml..

sorry the second instance is

 <xf:instance id="i-instance">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>



2011/4/18 daniele ippoliti <[hidden email]>
Hello If I receive an empty instance from the database is it possible to insert a template... I'm not able to do it....

            <xf:instance id="templateRefPoint">
                <RefPoint xmlns="">
                    <Name Language="" ID=""></Name>
                    <GeneralCategory></GeneralCategory>
                    <AttractionCategory></AttractionCategory>
                    <ReferenceCategory></ReferenceCategory>
                    <Rank></Rank>
                    <AppropriateFor></AppropriateFor>
                    <Seasonality></Seasonality>
                    <Description Language="" ID=""></Description>
                    <Location>
                        <LocationCode></LocationCode>
                        <DirectionFromHotel></DirectionFromHotel>
                        <Distance DistanceUnit=""></Distance>
                        <Latitude LatitudeUnit="" LatitudeOrientation=""></Latitude>
                        <Longitude LongitudeUnit="" LongitudeOrientation=""></Longitude>
                    </Location>
                    <Contact>
                        <PhoneCountry></PhoneCountry>
                        <PhoneAreaCity></PhoneAreaCity>
                        <PhoneNumber></PhoneNumber>
                        <WebsiteURL></WebsiteURL>
                        <StreetAddress></StreetAddress>
                        <CountryName></CountryName>
                        <StateProv></StateProv>
                        <CityName></CityName>
                        <PostalCode></PostalCode>
                    </Contact>
                </RefPoint>                                                   
            </xf:instance>

          <xf:instance id="templateRefPoint">
 <RefPoints xmlns="">
 </RefPoints>
</xf:instance>

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


....

         SAVE button

 <xf:trigger id="saveButtonBottom" class="orderListAddTrigger">
                     <xf:label>Save</xf:label>
                      <xf:action ev:event="DOMActivate">
                              <xf:insert context="instance('i-instance')" at="last()" position="after"  origin="instance('templateRefPoint')"/>
                      </xf:action>
           </xf:trigger>

SUBMIT BUTTON

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >        
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>


why the file myData is empty ?????


it's urgent !!!!

thank you for your answers
Daniele









--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..

Erik Bruchez
Administrator
In reply to this post by daniele ippoliti
On Mon, Apr 18, 2011 at 6:50 AM, daniele ippoliti <[hidden email]> wrote:
why you need nopdeset attribute and how would you set it ??????, I have read this link of IBM

We have some doc here:


See also the examples from XForms 1.1:


I hope this helps,

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: URGENT: I'm not able to do insert in an empty xml..

daniele ippoliti
thank you eric finally I have discorvered that the problem is in the submission...
but it's very strange... I have this behaviour:

1) if I have an xml with an initial structure and I try to add some node inside all works fine

2) if I pass as instance an xml like this my submission generates an empty file with only the xml intestation....

 <xf:submission id="s-send" method="put" action="file:/D:/fake/myData.xml" replace="none" instance="i-instance" validate="false" >    
        <xf:action ev:event="xforms-submit-error">
            <xf:message level="ephemeral">Submission failed</xf:message>
        </xf:action>
        <xf:action ev:event="xforms-submit-done">
            <xf:message level="ephemeral">Submission successfull.</xf:message>
        </xf:action>
    </xf:submission>

could you see any errors on it? or could you think that could be something in the instance imported that is:

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2007 rel. 3 (http://www.altova.com)-->
<RefPoints xmlns="">
</RefPoints>

because I expected that at least the RefPoints not it will be in the myData.xml output file but the output file it's complitly empty, I don't have the same behaviour if I pass a file like this



<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2007 rel. 3 (http://www.altova.com)-->
<RefPoints xmlns="">
<RefPoint>
<Name Language="en-us" ID="1">a</Name>
<GeneralCategory>Attraction</GeneralCategory>
<AttractionCategory>0</AttractionCategory>
<ReferenceCategory>0</ReferenceCategory>
<Rank>2</Rank>
<AppropriateFor>Family</AppropriateFor>
<Seasonality>Summer</Seasonality>
<Description Language="en-us" ID="1">a</Description>

<Location>
<LocationCode>a</LocationCode>
<DirectionFromHotel>North</DirectionFromHotel>
<Distance DistanceUnit="0">a</Distance>
<Latitude LatitudeUnit="0" LatitudeOrientation="North">a</Latitude>
<Longitude LongitudeUnit="0" LongitudeOrientation="East">a</Longitude>
</Location>

<Contact>
<PhoneCountry>0</PhoneCountry>
<PhoneAreaCity>0</PhoneAreaCity>
<PhoneNumber>0</PhoneNumber>

<WebsiteURL>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</WebsiteURL>
<StreetAddress>a</StreetAddress>
<CountryName>AA</CountryName>
<StateProv>aa</StateProv>
<CityName>a</CityName>
<PostalCode>a</PostalCode>
</Contact>

<Transportations>

<Transportation>
<TransportationMode>0</TransportationMode>
<Chargeable>true</Chargeable>
<Fee Currency="AAA">1.123</Fee>
<ChargeType>One Way</ChargeType>
<ReservationRequired>true</ReservationRequired>
<TypicalTravelTime>0</TypicalTravelTime>
<DirectionsFromHotel Language="en-us" ID="1">a</DirectionsFromHotel>
<DirectionsFromPOR Language="en-us" ID="1">a</DirectionsFromPOR>
<Description Language="en-us" ID="1">a</Description>

<OperationSchedules>

<OperationSchedule>
<BeginDate>1967-08-13</BeginDate>
<EndDate>1967-08-13</EndDate>
<BeginTime>1967-08-13</BeginTime>
<EndTime>1967-08-13</EndTime>
<DaysOfWeek Weds="true" Sun="true" Tue="true" Sat="true" Fri="true" Mon="true" Thur="true"/>
</OperationSchedule>
</OperationSchedules>
</Transportation>
</Transportations>

<OperationSchedules>

<OperationSchedule>
<BeginDate>1967-08-13</BeginDate>
<EndDate>1967-08-13</EndDate>
<BeginTime>1967-08-13</BeginTime>
<EndTime>1967-08-13</EndTime>
<DaysOfWeek Weds="true" Sun="true" Tue="true" Sat="true" Fri="true" Mon="true" Thur="true"/>
</OperationSchedule>
</OperationSchedules>
</RefPoint>
</RefPoints>


why????


Daniele Ippoliti

2011/4/19 Erik Bruchez <[hidden email]>
On Mon, Apr 18, 2011 at 6:50 AM, daniele ippoliti <[hidden email]> wrote:
why you need nopdeset attribute and how would you set it ??????, I have read this link of IBM

We have some doc here:


See also the examples from XForms 1.1:


I hope this helps,

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws