Hi all,
I've been looking over the documentation on dynamic autocomplete at http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Autocomplete . Dealing with a static instance, whether embedded directly in the XForm or referenced from an external service, is fairly easy, but I'm not sure where to begin on interacting with a service that has hundreds of thousands of entries. So here's the scenario. The Library of Congress has close to a million subject authority terms, freely available. I have taken their enormous rdf file, stripped out the info I don't need and placed all of the subject terms into a Solr index. Solr 1.4 has a new feature called TermsComponent, which is intended for use in autosuggest. It accepts a parameter of a string inputted by a user and returns results that start with the string. For example: http://localhost:8080/solr/terms?terms.fl=subject&terms.prefix=Egy&terms.limit=25 returns 25 terms that begin with "Egy", all LOC subjects dealing with Egypt, unsurprisingly, and this is incredibly fast. But the documentation for dynamic itemsets does not really discuss how the text that has been typed can be passed along to a service. Suppose there is an instance defined as follows: <xforms:instance id="subjects-template" src="<a href="http://localhost:8080/solr/terms?terms.fl=subject&amp;terms.limit=25&amp;terms.prefix={###}">http://localhost:8080/solr/terms?terms.fl=subject&terms.limit=25&terms.prefix={###}"/> Is there some way to pass the text you have typed into the fr:autocomplete input box into the instance? Can this be done completely within the context of the form without modifying javascript content of the jar files? Thanks, Ethan -- 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 |
Administrator
|
Ethan,
This is an older message, so you might have figured this out already. But for reference: yes, you can. In essence you react to the fr-search-changed event, access the value typed by the user with event('fr-search-value') and run your submission. The result of the submission comes to an instance, which you point to with xforms:itemset inside the fr:autocomplete. I think you'll find the example under "Dynamic Itemset" useful, see: http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Dynamic-Itemset Alex On Fri, Feb 19, 2010 at 8:58 AM, Ethan Gruber <[hidden email]> wrote: > Hi all, > > I've been looking over the documentation on dynamic autocomplete at > http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Autocomplete > . Dealing with a static instance, whether embedded directly in the XForm or > referenced from an external service, is fairly easy, but I'm not sure where > to begin on interacting with a service that has hundreds of thousands of > entries. So here's the scenario. > > The Library of Congress has close to a million subject authority terms, > freely available. I have taken their enormous rdf file, stripped out the > info I don't need and placed all of the subject terms into a Solr index. > Solr 1.4 has a new feature called TermsComponent, which is intended for use > in autosuggest. It accepts a parameter of a string inputted by a user and > returns results that start with the string. For example: > > http://localhost:8080/solr/terms?terms.fl=subject&terms.prefix=Egy&terms.limit=25 > > returns 25 terms that begin with "Egy", all LOC subjects dealing with Egypt, > unsurprisingly, and this is incredibly fast. > > But the documentation for dynamic itemsets does not really discuss how the > text that has been typed can be passed along to a service. Suppose there is > an instance defined as follows: > > <xforms:instance id="subjects-template" > src="http://localhost:8080/solr/terms?terms.fl=subject&terms.limit=25&terms.prefix={###}"/> > > Is there some way to pass the text you have typed into the fr:autocomplete > input box into the instance? Can this be done completely within the context > of the form without modifying javascript content of the jar files? > > Thanks, > Ethan > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alex,
Excellent! Between this and the Google autosuggest example, I was able to figure it out. Maybe sometime I could write up a wiki post on Orbeon-Solr interoperability. I think it would be useful since most people in my field have moved to Lucene/Solr indexes. Ethan On Fri, Feb 26, 2010 at 6:00 PM, Alessandro Vernet <[hidden email]> wrote: Ethan, -- 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 |
In reply to this post by Ethan Gruber
I would be very interested in seeing that, Ethan, as we were discussing doing the exact same thing (LCSH in solr for an xforms autocomplete).
-- Scott On 02/27/10, Ethan Gruber <[hidden email]> wrote: > Alex, > > Excellent! Between this and the Google autosuggest example, I was able to figure it out. Maybe sometime I could write up a wiki post on Orbeon-Solr interoperability. I think it would be useful since most people in my field have moved to Lucene/Solr indexes. > > > Ethan > -- 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 |
Administrator
|
In reply to this post by Ethan Gruber
Hi Ethan,
Excellent; I am glad to read this. And like Scott said, it would be great for the community of you can share your findings. If you want to put this on the Orbeon wiki, I think this would fit in the form of a how-to which could be added to: http://wiki.orbeon.com/forms/how-to Let me know if you are interested in doing this, and we'll grant you write-access to the wiki. Alex On Sat, Feb 27, 2010 at 12:23 PM, Ethan Gruber <[hidden email]> wrote: > Alex, > > Excellent! Between this and the Google autosuggest example, I was able to > figure it out. Maybe sometime I could write up a wiki post on Orbeon-Solr > interoperability. I think it would be useful since most people in my field > have moved to Lucene/Solr indexes. > > Ethan > > On Fri, Feb 26, 2010 at 6:00 PM, Alessandro Vernet <[hidden email]> > wrote: >> >> Ethan, >> >> This is an older message, so you might have figured this out already. >> But for reference: yes, you can. >> >> In essence you react to the fr-search-changed event, access the value >> typed by the user with event('fr-search-value') and run your >> submission. The result of the submission comes to an instance, which >> you point to with xforms:itemset inside the fr:autocomplete. I think >> you'll find the example under "Dynamic Itemset" useful, see: >> >> >> http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Dynamic-Itemset >> >> Alex >> >> On Fri, Feb 19, 2010 at 8:58 AM, Ethan Gruber <[hidden email]> wrote: >> > Hi all, >> > >> > I've been looking over the documentation on dynamic autocomplete at >> > >> > http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Autocomplete >> > . Dealing with a static instance, whether embedded directly in the >> > XForm or >> > referenced from an external service, is fairly easy, but I'm not sure >> > where >> > to begin on interacting with a service that has hundreds of thousands of >> > entries. So here's the scenario. >> > >> > The Library of Congress has close to a million subject authority terms, >> > freely available. I have taken their enormous rdf file, stripped out >> > the >> > info I don't need and placed all of the subject terms into a Solr index. >> > Solr 1.4 has a new feature called TermsComponent, which is intended for >> > use >> > in autosuggest. It accepts a parameter of a string inputted by a user >> > and >> > returns results that start with the string. For example: >> > >> > >> > http://localhost:8080/solr/terms?terms.fl=subject&terms.prefix=Egy&terms.limit=25 >> > >> > returns 25 terms that begin with "Egy", all LOC subjects dealing with >> > Egypt, >> > unsurprisingly, and this is incredibly fast. >> > >> > But the documentation for dynamic itemsets does not really discuss how >> > the >> > text that has been typed can be passed along to a service. Suppose >> > there is >> > an instance defined as follows: >> > >> > <xforms:instance id="subjects-template" >> > >> > src="http://localhost:8080/solr/terms?terms.fl=subject&terms.limit=25&terms.prefix={###}"/> >> > >> > Is there some way to pass the text you have typed into the >> > fr:autocomplete >> > input box into the instance? Can this be done completely within the >> > context >> > of the form without modifying javascript content of the jar files? >> > >> > Thanks, >> > Ethan >> > >> > >> > -- >> > 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 >> > >> > >> >> >> >> -- >> Orbeon Forms - Web forms, open-source, for the Enterprise - >> http://www.orbeon.com/ >> My Twitter: http://twitter.com/avernet >> >> >> -- >> 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex,
I would definitely like to an article to the wiki soon. I need to attempt to iron out some glitches when using the fr:autocomplete with dynamic itemsets within a repeat. Static itemsets work correctly. To sum it up, only the most recently modified input retains its text. If you add a new subject to edit, the previous subject node empties. I attempted to get around this by changing the ref of fr:autocomplete to a temporary instance('suggest-buffer') and adding adding the line "<xforms:setvalue ref="." value="$search-value"/>" to set the value of the node that way, but changing the ref of fr:autocomplete to a difference instance from the current context results in some sort of infinite loop. Ethan On Mon, Mar 1, 2010 at 5:21 PM, Alessandro Vernet <[hidden email]> wrote: Hi Ethan, -- 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 |
Hi All, I’m using Orbeon Forms 3.7.0beta1.200809092012 I’ve got an SQL pipeline with nested queries but I’m
getting error messages like this: Exception at line 49 of
oxf:/apps/demo-customer/services/service-get-items-set.xpl My pipeline is based on the nested query example in my local
Orbeon user guide [http://localhost:8080/orbeon3.7beta/doc/processors-sql#d6e1973]: I notice that sql:get-column was renamed to sql:get-column-value in
version 3.0. I’ve been using sql:get-column-value in
non-nested queries without any problems. Perhaps I’m using the wrong
schema? (- I don’t get anything when I try to access http://orbeon.org/oxf/xml/sql
from my web browser) I noticed a few postings reporting a problem like this back in
2006, but no resolution. Regards, Alan. -- 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 |
In reply to this post by Ethan Gruber
Hi, I’m launching a new record edit form using parameters
input by the user on an initial form: <xforms:trigger ref="instance('form-instance')"> <xforms:action ev:event="DOMActivate" > <xforms:load
resource="/demo-customer/scenario/create/{scenario-name}/{template-id}/{flag-value}/{dataset-id}/{country-id}/{year-id}"
/> </xforms:action> <xforms:label>New Scenario</xforms:label> </xforms:trigger> However, instance('form-instance')/scenario-name can
contain spaces. I wanted to use escape-uri() to convert them, and
any other characters that need converting, to things like “%20”. –
I’ve been getting error messages indicating that escape-uri()is
not implemented. Should I be using some other mechanism to create a valid
URL in this case? Regards, Alan. -- 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 |
Administrator
|
In reply to this post by Alan Leavy
Alan,
That's right, you should be using sql:get-column-value, and it should work in nested queries. Could you give us an example of query that doesn't work? Alex On Thu, Mar 11, 2010 at 1:40 AM, Leavy, Alan <[hidden email]> wrote: > Hi All, > > > > I’m using Orbeon Forms 3.7.0beta1.200809092012 > > I’ve got an SQL pipeline with nested queries but I’m getting error messages > like this: > > Exception at line 49 of > oxf:/apps/demo-customer/services/service-get-items-set.xpl > org.orbeon.oxf.common.ValidationException: line 49 of > oxf:/apps/demo-customer/services/service-get-items-set.xpl: Error tag name > "sql:get-column-value" is not allowed. Possible tag names are: <get-column>, > and more(schema: http://orbeon.org/oxf/xml/sql) > > > > My pipeline is based on the nested query example in my local Orbeon user > guide [http://localhost:8080/orbeon3.7beta/doc/processors-sql#d6e1973]: > > > > I notice that sql:get-column was renamed to sql:get-column-value in version > 3.0. I’ve been using sql:get-column-value in non-nested queries without any > problems. Perhaps I’m using the wrong schema? (- I don’t get anything when I > try to access http://orbeon.org/oxf/xml/sql from my web browser) > > > > I noticed a few postings reporting a problem like this back in 2006, but no > resolution. > > > > Regards, > > Alan. > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
In reply to this post by Alan Leavy
Alan,
There is no escape-uri() in XPath. I think that what you want is encode-for-uri(): http://www.w3.org/TR/xpath-functions/#func-encode-for-uri Alex On Thu, Mar 11, 2010 at 1:59 AM, Leavy, Alan <[hidden email]> wrote: > Hi, > > > > I’m launching a new record edit form using parameters input by the user on > an initial form: > > > > <xforms:trigger ref="instance('form-instance')"> > > <xforms:action ev:event="DOMActivate" > > > <xforms:load > resource="/demo-customer/scenario/create/{scenario-name}/{template-id}/{flag-value}/{dataset-id}/{country-id}/{year-id}" > /> > > </xforms:action> > > <xforms:label>New Scenario</xforms:label> > > </xforms:trigger> > > > > However, instance('form-instance')/scenario-name can contain spaces. I > wanted to use escape-uri() to convert them, and any other characters that > need converting, to things like “%20”. – I’ve been getting error messages > indicating that escape-uri()is not implemented. > > > > Should I be using some other mechanism to create a valid URL in this case? > > > > Regards, > > Alan. > > > > > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Alessandro Vernet
Hi Alessandro,
Thanks for your response. Here's the complete pipeline: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xi="http://www.w3.org/2001/XInclude"> <p:param type="input" name="instance" /> <p:param type="output" name="data" /> <p:processor name="oxf:sql"> <p:input name="data" href="#instance" /> <p:input name="config"> <sql:config> <results> <sql:connection> <sql:datasource>mande_jDTS</sql:datasource> <sql:execute> <!-- The top most level, get the items and section names --> <sql:query>SELECT DISTINCT tbl_template_items.template_id AS template_id, tbl_items.item_id AS dataset_id, tbl_items.item_name as dataset_name FROM tbl_template_items INNER JOIN tbl_templates ON tbl_templates.template_id=tbl_template_items.template_id INNER JOIN tbl_items ON tbl_items.item_id=tbl_template_items.item_id WHERE tbl_items.item_parent=0</sql:query> <sql:result-set> <sql:row-iterator> <dataset> <!-- dataset header --> <dataset-header> <dataset-id> <sql:get-column-value type="xs:int" column="dataset_id"/> </dataset-id> <dataset-name> <sql:get-column-value type="xs:string" column="dataset_name"/> </dataset-name> </dataset-header> <!-- End of dataset header--> <!-- Dataset members --> <dataset-members> <sql:execute> <sql:query> <!-- The sub query Getting the sections/category values-->SELECT tbl_items.item_id as category_id, tbl_items.item_name as category_name FROM tbl_items WHERE tbl_items.item_parent = <sql:param type="xs:int"> <sql:get-column-value type="xs:int" column="dataset_id"/> </sql:param> </sql:query> <sql:result-set> <sql:row-iterator> <category> <!-- Category header --> <category-header> <category-id> <sql:get-column-value type="xs:int" column="category_id"/> </category-id> <category-name> <sql:get-column-value type="xs:string" column="category_name"/> </category-name> </category-header> <!-- End of Category header --> <!-- Category members --> <category-members> <sql:execute> <sql:query> <!-- The sub sub query for getting the data items values -->SELECT tbl_items.item_id as item_id, tbl_items.item_name as item_name FROM tbl_items WHERE tbl_items.item_id= <sql:param type="xs:int"> <sql:get-column-value type="xs:int" column="category_id"/> </sql:param>order by tbl_items.item_name</sql:query> <sql:result-set> <sql:row-iterator> <item-name> <sql:get-column-value type="xs:string" column="item_name"/> </item-name> </sql:row-iterator> </sql:result-set> </sql:execute> </category-members> <!-- End of category members --></category> </sql:row-iterator> </sql:result-set> </sql:execute> </dataset-members> <!-- end of dataset members --></dataset> </sql:row-iterator> </sql:result-set> </sql:execute> </sql:connection> </results> </sql:config> </p:input> <p:output name="data" ref="data" /> </p:processor> </p:config> It gives the following error: Exception at line 49 of oxf:/apps/demo-customer/services/service-get-items-set.xpl org.orbeon.oxf.common.ValidationException: line 49 of oxf:/apps/demo-customer/services/service-get-items-set.xpl: Error tag name "sql:get-column-value" is not allowed. Possible tag names are: <get-column>, and more(schema: http://orbeon.org/oxf/xml/sql) Regards, Alan. -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Friday, March 12, 2010 7:22 AM To: [hidden email] Subject: [ops-users] Re: sql:get-column-value in nested queries - a known problem? Alan, That's right, you should be using sql:get-column-value, and it should work in nested queries. Could you give us an example of query that doesn't work? Alex On Thu, Mar 11, 2010 at 1:40 AM, Leavy, Alan <[hidden email]> wrote: > Hi All, > > > > I'm using Orbeon Forms 3.7.0beta1.200809092012 > > I've got an SQL pipeline with nested queries but I'm getting error > messages like this: > > Exception at line 49 of > oxf:/apps/demo-customer/services/service-get-items-set.xpl > org.orbeon.oxf.common.ValidationException: line 49 of > oxf:/apps/demo-customer/services/service-get-items-set.xpl: Error tag > name "sql:get-column-value" is not allowed. Possible tag names are: > <get-column>, and more(schema: http://orbeon.org/oxf/xml/sql) > > > > My pipeline is based on the nested query example in my local Orbeon > user guide [http://localhost:8080/orbeon3.7beta/doc/processors-sql#d6e1973]: > > > > I notice that sql:get-column was renamed to sql:get-column-value in > version 3.0. I've been using sql:get-column-value in non-nested > queries without any problems. Perhaps I'm using the wrong schema? (- I > don't get anything when I try to access http://orbeon.org/oxf/xml/sql > from my web browser) > > > > I noticed a few postings reporting a problem like this back in 2006, > but no resolution. > > > > Regards, > > Alan. > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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 |
Administrator
|
Alan,
There was indeed a bug, which I fixed. For reference: Bug: http://forge.ow2.org/tracker/index.php?func=detail&aid=314909&group_id=168&atid=350207 Commit: http://github.com/orbeon/orbeon-forms/commit/3040d23116d800b8d5e1c3510f8ea047457b12ec I also made the schema a bit more consistent to still support both sql:get-column and sql:get-column-value. I hope this helps! -Erik On Mon, Mar 15, 2010 at 12:37 AM, Leavy, Alan <[hidden email]> wrote: > Hi Alessandro, > > Thanks for your response. > Here's the complete pipeline: > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xi="http://www.w3.org/2001/XInclude"> > <p:param type="input" name="instance" /> > <p:param type="output" name="data" /> > <p:processor name="oxf:sql"> > <p:input name="data" href="#instance" /> > <p:input name="config"> > <sql:config> > <results> > <sql:connection> > <sql:datasource>mande_jDTS</sql:datasource> > <sql:execute> > <!-- The top most level, get the items and section names --> > <sql:query>SELECT DISTINCT tbl_template_items.template_id AS template_id, tbl_items.item_id AS dataset_id, tbl_items.item_name as dataset_name FROM tbl_template_items INNER JOIN tbl_templates ON tbl_templates.template_id=tbl_template_items.template_id INNER JOIN tbl_items ON tbl_items.item_id=tbl_template_items.item_id WHERE tbl_items.item_parent=0</sql:query> > <sql:result-set> > <sql:row-iterator> > <dataset> > <!-- dataset header --> > <dataset-header> > <dataset-id> > <sql:get-column-value type="xs:int" column="dataset_id"/> > </dataset-id> > <dataset-name> > <sql:get-column-value type="xs:string" column="dataset_name"/> > </dataset-name> > </dataset-header> > <!-- End of dataset header--> > <!-- Dataset members --> > <dataset-members> > <sql:execute> > <sql:query> > <!-- The sub query Getting the sections/category values-->SELECT tbl_items.item_id as category_id, tbl_items.item_name as category_name FROM tbl_items WHERE tbl_items.item_parent = > <sql:param type="xs:int"> > <sql:get-column-value type="xs:int" column="dataset_id"/> > </sql:param> > </sql:query> > <sql:result-set> > <sql:row-iterator> > <category> > <!-- Category header --> > <category-header> > <category-id> > <sql:get-column-value type="xs:int" column="category_id"/> > </category-id> > <category-name> > <sql:get-column-value type="xs:string" column="category_name"/> > </category-name> > </category-header> > <!-- End of Category header --> > <!-- Category members --> > <category-members> > <sql:execute> > <sql:query> > <!-- The sub sub query for getting the data items values -->SELECT tbl_items.item_id as item_id, tbl_items.item_name as item_name FROM tbl_items WHERE tbl_items.item_id= > <sql:param type="xs:int"> > <sql:get-column-value type="xs:int" column="category_id"/> > </sql:param>order by tbl_items.item_name</sql:query> > <sql:result-set> > <sql:row-iterator> > <item-name> > <sql:get-column-value type="xs:string" column="item_name"/> > </item-name> > </sql:row-iterator> > </sql:result-set> > </sql:execute> > </category-members> > <!-- End of category members --></category> > </sql:row-iterator> > </sql:result-set> > </sql:execute> > </dataset-members> > <!-- end of dataset members --></dataset> > </sql:row-iterator> > </sql:result-set> > </sql:execute> > </sql:connection> > </results> > </sql:config> > </p:input> > <p:output name="data" ref="data" /> > </p:processor> > </p:config> > > It gives the following error: > Exception at line 49 of oxf:/apps/demo-customer/services/service-get-items-set.xpl > org.orbeon.oxf.common.ValidationException: line 49 of oxf:/apps/demo-customer/services/service-get-items-set.xpl: Error tag name "sql:get-column-value" is not allowed. Possible tag names are: <get-column>, and more(schema: http://orbeon.org/oxf/xml/sql) > > Regards, > Alan. > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Friday, March 12, 2010 7:22 AM > To: [hidden email] > Subject: [ops-users] Re: sql:get-column-value in nested queries - a known problem? > > Alan, > > That's right, you should be using sql:get-column-value, and it should work in nested queries. Could you give us an example of query that doesn't work? > > Alex > > On Thu, Mar 11, 2010 at 1:40 AM, Leavy, Alan <[hidden email]> wrote: >> Hi All, >> >> >> >> I'm using Orbeon Forms 3.7.0beta1.200809092012 >> >> I've got an SQL pipeline with nested queries but I'm getting error >> messages like this: >> >> Exception at line 49 of >> oxf:/apps/demo-customer/services/service-get-items-set.xpl >> org.orbeon.oxf.common.ValidationException: line 49 of >> oxf:/apps/demo-customer/services/service-get-items-set.xpl: Error tag >> name "sql:get-column-value" is not allowed. Possible tag names are: >> <get-column>, and more(schema: http://orbeon.org/oxf/xml/sql) >> >> >> >> My pipeline is based on the nested query example in my local Orbeon >> user guide [http://localhost:8080/orbeon3.7beta/doc/processors-sql#d6e1973]: >> >> >> >> I notice that sql:get-column was renamed to sql:get-column-value in >> version 3.0. I've been using sql:get-column-value in non-nested >> queries without any problems. Perhaps I'm using the wrong schema? (- I >> don't get anything when I try to access http://orbeon.org/oxf/xml/sql >> from my web browser) >> >> >> >> I noticed a few postings reporting a problem like this back in 2006, >> but no resolution. >> >> >> >> Regards, >> >> Alan. >> >> >> >> -- >> 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 >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet > > > -- > 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 |
Free forum by Nabble | Edit this page |