Hi,
I'm having a few probs using the aggregate function. I've wrapped up some incoming xml and would like to merge it (tag for tag) with some base XML needed for my form. My aggregate function looks like this: <p:processor name="oxf:identity"> <p:input name="data" href="aggregate('OrbeonRoot', base.xml, #transformed )"/> <p:output name="data" ref="data"/> </p:processor> #transformed is: <?xml version="1.0" encoding="UTF-8"?> <Document> <DHeader> <documenttype>test</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> </DHeader> </Document> and base.xml contains: <?xml version="1.0" encoding="UTF-8"?> <Document> <DHeader> <documenttype>doctype</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> <sponsorurl></sponsorurl> <sponsorlogo></sponsorlogo> <bodyhash></bodyhash> </DHeader> </Document> However, the result of the aggregation gives me a new instance with one XML file list after the other with the new root: <OrbeonRoot> <Document> <DHeader> <documenttype>test</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> </DHeader> </Document> <Document> <DHeader> <documenttype>doctype</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> <sponsorurl></sponsorurl> <sponsorlogo></sponsorlogo> <bodyhash></bodyhash> </DHeader> </Document> </OrbeonRoot> Is there a way to just merge the two together? If so, how? Or failing that can I set my XForm to use a base XML file to use the tags/values which aren't present in any incoming XML file? -- Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Colin,
#transformed#xpointer(/Document/*) will do the trick, but you may need to put base.xml through a identity processor to get an XPL input (i.e. #base), you will have to try it to find out Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: Colin Seaman [mailto:[hidden email]] >Sent: 09 January 2007 12:37 >To: [hidden email] >Subject: [ops-users] aggregate > >Hi, > >I'm having a few probs using the aggregate function. I've >wrapped up some incoming xml and would like to merge it (tag >for tag) with some base XML needed for my form. > >My aggregate function looks like this: ><p:processor name="oxf:identity"> > <p:input name="data" href="aggregate('OrbeonRoot', >base.xml, #transformed )"/> > <p:output name="data" ref="data"/> > </p:processor> > >#transformed is: ><?xml version="1.0" encoding="UTF-8"?> ><Document> > <DHeader> > <documenttype>test</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> ></DHeader> ></Document> > >and base.xml contains: ><?xml version="1.0" encoding="UTF-8"?> ><Document> > <DHeader> > <documenttype>doctype</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> > <sponsorurl></sponsorurl> > <sponsorlogo></sponsorlogo> > <bodyhash></bodyhash> > </DHeader> ></Document> > >However, the result of the aggregation gives me a new instance >with one XML file list after the other with the new root: > ><OrbeonRoot> ><Document> > <DHeader> > <documenttype>test</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> ></DHeader> ></Document> ><Document> > <DHeader> > <documenttype>doctype</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> > <sponsorurl></sponsorurl> > <sponsorlogo></sponsorlogo> > <bodyhash></bodyhash> > </DHeader> ></Document> ></OrbeonRoot> > >Is there a way to just merge the two together? If so, how? >Or failing that can I set my XForm to use a base XML file to >use the tags/values which aren't present in any incoming XML file? > > >-- >Colin Seaman >Senior Developer > >Tradocs Ltd, >Tower Point, >44 North Road, >Brighton, >BN1 1YR > >email: [hidden email] >skype: colin,seaman >telephone: 0870-1417031 >website: http://www.tradocs.net > >This email and any files transmitted with it are confidential >and intended solely for the use of the individual or entity to >whom they are addressed. If you have received this email in >error please contact Tradocs. Please note that any views or >opinions presented in this email are solely those of the author >and do not necessarily represent those of the company. Finally, >the recipient should check this email and any attachments for >the presence of viruses. The company accepts no liability for >any damage caused by any virus transmitted by this email. >This content of this email is without prejudice. > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Ryan,
Unfortunately that didn't solve the problem. The aggregate still produces one xml file after the other however the /Document/ tag is missing from the #transformed input. <p:processor name="oxf:identity"> <p:input name="data" href="base.xml"/> <p:output name="data" id="existingxml"/> </p:processor> <p:processor name="oxf:identity"> <p:input name="data" href="aggregate('OrbeonRoot', #existingxml, #transformed#xpointer(/Document/*))"/> <p:output name="data" ref="data"/> </p:processor> Tried: <p:input name="data" href="aggregate('OrbeonRoot', #existingxml#xpointer(/Document/*), #transformed#xpointer(/Document/*))"/> too and a few other iterations but no joy. Did this work for you? Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. Ryan Puddephatt wrote: Colin, #transformed#xpointer(/Document/*) will do the trick, but you may need to put base.xml through a identity processor to get an XPL input (i.e. #base), you will have to try it to find out Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108-----Original Message----- From: Colin Seaman [[hidden email]] Sent: 09 January 2007 12:37 To: [hidden email] Subject: [ops-users] aggregate Hi, I'm having a few probs using the aggregate function. I've wrapped up some incoming xml and would like to merge it (tag for tag) with some base XML needed for my form. My aggregate function looks like this: <p:processor name="oxf:identity"> <p:input name="data" href="aggregate('OrbeonRoot', base.xml, #transformed )"/> <p:output name="data" ref="data"/> </p:processor> #transformed is: <?xml version="1.0" encoding="UTF-8"?> <Document> <DHeader> <documenttype>test</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> </DHeader> </Document> and base.xml contains: <?xml version="1.0" encoding="UTF-8"?> <Document> <DHeader> <documenttype>doctype</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> <sponsorurl></sponsorurl> <sponsorlogo></sponsorlogo> <bodyhash></bodyhash> </DHeader> </Document> However, the result of the aggregation gives me a new instance with one XML file list after the other with the new root: <OrbeonRoot> <Document> <DHeader> <documenttype>test</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> </DHeader> </Document> <Document> <DHeader> <documenttype>doctype</documenttype> <logourl>logo.gif</logourl> <weburl>www.something.com</weburl> <sponsorurl></sponsorurl> <sponsorlogo></sponsorlogo> <bodyhash></bodyhash> </DHeader> </Document> </OrbeonRoot> Is there a way to just merge the two together? If so, how? Or failing that can I set my XForm to use a base XML file to use the tags/values which aren't present in any incoming XML file? -- Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Colin,
I thought you wanted this to remove the Document
elements, putting the child elements underneath the OrbeonRoot? What do you mean
by merge? do you want some of the data to take presidence of the other, i.e.
replace it
Ryan
Ryan
Puddephatt
-- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Yep, the incoming data (#transformed) needs to be merged with the basic
xml data base.xml. I believe I'll need to make use of xupdate
Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. Ryan Puddephatt wrote:
-- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Colin,
This will definitly need something more than
aggregate. XSLT maybe more flexible, but I'm sure xupdate will do
it
Ryan
Ryan
Puddephatt
-- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
something short of creating an xslt map for each one in the xpl, is
there just a quick way two instances can be bound together in a xform?
Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. Ryan Puddephatt wrote:
-- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Colin,
I would use XSLT for this. If you like XUpdate despite the fact that it is less standard and possibly not as efficient, then XUpdate should do the trick as well. If you want to venture this way, you might be able to do this directly in XForms as well with the "while" attribute on actions. Alex On 1/9/07, Colin Seaman <[hidden email]> wrote: > > something short of creating an xslt map for each one in the xpl, is there just a quick way two instances can be bound together in a xform? > > Colin Seaman > Senior Developer > > Tradocs Ltd, > Tower Point, > 44 North Road, > Brighton, > BN1 1YR > > email: [hidden email] > skype: colin,seaman > telephone: 0870-1417031 > website: http://www.tradocs.net > > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity to > whom they are addressed. If you have received this email in > error please contact Tradocs. Please note that any views or > opinions presented in this email are solely those of the author > and do not necessarily represent those of the company. Finally, > the recipient should check this email and any attachments for > the presence of viruses. The company accepts no liability for > any damage caused by any virus transmitted by this email. > This content of this email is without prejudice. > > > Ryan Puddephatt wrote: > > Colin, > This will definitly need something more than aggregate. XSLT maybe more flexible, but I'm sure xupdate will do it > > Ryan > > > > > > Ryan Puddephatt > Software Engineer > > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > w> www.teleflex.com > > > > > ________________________________ > Sent: 09 January 2007 16:26 > To: [hidden email] > Subject: Re: [ops-users] aggregate > > Yep, the incoming data (#transformed) needs to be merged with the basic xml data base.xml. I believe I'll need to make use of xupdate > Colin Seaman > Senior Developer > > Tradocs Ltd, > Tower Point, > 44 North Road, > Brighton, > BN1 1YR > > email: [hidden email] > skype: colin,seaman > telephone: 0870-1417031 > website: http://www.tradocs.net > > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity to > whom they are addressed. If you have received this email in > error please contact Tradocs. Please note that any views or > opinions presented in this email are solely those of the author > and do not necessarily represent those of the company. Finally, > the recipient should check this email and any attachments for > the presence of viruses. The company accepts no liability for > any damage caused by any virus transmitted by this email. > This content of this email is without prejudice. > > > Ryan Puddephatt wrote: > > Colin, > I thought you wanted this to remove the Document elements, putting the child elements underneath the OrbeonRoot? What do you mean by merge? do you want some of the data to take presidence of the other, i.e. replace it > > Ryan > > > > > > Ryan Puddephatt > Software Engineer > > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > w> www.teleflex.com > > > > > ________________________________ > Sent: 09 January 2007 14:45 > To: [hidden email] > Subject: Re: [ops-users] aggregate > > Hi Ryan, > > Unfortunately that didn't solve the problem. The aggregate still produces one xml file after the other however the /Document/ tag is missing from the #transformed input. > > <p:processor name="oxf:identity"> > <p:input name="data" href="base.xml"/> > <p:output name="data" id="existingxml"/> > </p:processor> > > <p:processor name="oxf:identity"> > <p:input name="data" href="aggregate('OrbeonRoot', #existingxml, #transformed#xpointer(/Document/*))"/> > <p:output name="data" ref="data"/> > </p:processor> > > Tried: > <p:input name="data" href="aggregate('OrbeonRoot', #existingxml#xpointer(/Document/*), #transformed#xpointer(/Document/*))"/> > > too and a few other iterations but no joy. Did this work for you? > Colin Seaman > Senior Developer > > Tradocs Ltd, > Tower Point, > 44 North Road, > Brighton, > BN1 1YR > > email: [hidden email] > skype: colin,seaman > telephone: 0870-1417031 > website: http://www.tradocs.net > > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity to > whom they are addressed. If you have received this email in > error please contact Tradocs. Please note that any views or > opinions presented in this email are solely those of the author > and do not necessarily represent those of the company. Finally, > the recipient should check this email and any attachments for > the presence of viruses. The company accepts no liability for > any damage caused by any virus transmitted by this email. > This content of this email is without prejudice. > > > Ryan Puddephatt wrote: > Colin, > #transformed#xpointer(/Document/*) will do the trick, but you may > need to put base.xml through a identity processor to get an XPL input (i.e. > #base), you will have to try it to find out > > Ryan > > Ryan Puddephatt > Software Engineer > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > > > > > > -----Original Message----- > From: Colin Seaman [mailto:[hidden email]] > Sent: 09 January 2007 12:37 > To: [hidden email] > Subject: [ops-users] aggregate > > Hi, > > I'm having a few probs using the aggregate function. I've > wrapped up some incoming xml and would like to merge it (tag > for tag) with some base XML needed for my form. > > My aggregate function looks like this: > <p:processor name="oxf:identity"> > <p:input name="data" href="aggregate('OrbeonRoot', > base.xml, #transformed )"/> > <p:output name="data" ref="data"/> > </p:processor> > > #transformed is: > <?xml version="1.0" encoding="UTF-8"?> > <Document> > <DHeader> > <documenttype>test</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> > </DHeader> > </Document> > > and base.xml contains: > <?xml version="1.0" encoding="UTF-8"?> > <Document> > <DHeader> > <documenttype>doctype</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> > <sponsorurl></sponsorurl> > <sponsorlogo></sponsorlogo> > <bodyhash></bodyhash> > </DHeader> > </Document> > > However, the result of the aggregation gives me a new instance > with one XML file list after the other with the new root: > > <OrbeonRoot> > <Document> > <DHeader> > <documenttype>test</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> > </DHeader> > </Document> > <Document> > <DHeader> > <documenttype>doctype</documenttype> > <logourl>logo.gif</logourl> > <weburl>www.something.com</weburl> > <sponsorurl></sponsorurl> > <sponsorlogo></sponsorlogo> > <bodyhash></bodyhash> > </DHeader> > </Document> > </OrbeonRoot> > > Is there a way to just merge the two together? If so, how? > Or failing that can I set my XForm to use a base XML file to > use the tags/values which aren't present in any incoming XML file? > > > -- > Colin Seaman > Senior Developer > > Tradocs Ltd, > Tower Point, > 44 North Road, > Brighton, > BN1 1YR > > email: [hidden email] > skype: colin,seaman > telephone: 0870-1417031 > website: http://www.tradocs.net > > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity to > whom they are addressed. If you have received this email in > error please contact Tradocs. Please note that any views or > opinions presented in this email are solely those of the author > and do not necessarily represent those of the company. Finally, > the recipient should check this email and any attachments for > the presence of viruses. The company accepts no liability for > any damage caused by any virus transmitted by this email. > This content of this email is without prejudice. > > > > > > ________________________________ > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Orbeon Forms - Web Forms for the Enterprise, Done the Right Way http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |