Hello,
I'm trying to use OPS with a non-embedded eXist database. I managed to set up a datasource and it works (view + model using the xmldb processor). But I've encountered some issues : 1/ the nodeset of xmldb processor output is sometimes empty for no reason, even though the eXist database contains data. Resfreshing the web page solves the problem but it's quite strange, as if the database was suddenly empty... 2/ it looks like the output of xmldb processor has lost the namespace information of the retrieved nodes. Is that an eXist issue ? I couldn't have a look at the XML RPC response it sends to OPS because it's base64-encoded. I'd like to be able to refer to my instance elements using a QName, e.g. <xforms:output ref="tf:element"/>. 3/ there seems to be a problem with instance elements which have a non-ASCII name. For example, in my view I have : <xforms:output ref="numéro"/> (notice the 'é', i.e. #xe9, letter) And when a DOMFocus event happens (i.e. I click) on this XForms control, an error message appears at the top : XForms error: Fatal error: Element type "num" must be followed by either attribute specifications, ">" or "/>". With 'num' being the first letters of 'numéro', up to the first non-ASCII character. Is it a bug or a (known) limitation ? In the second case, that would be a show-stopper to my use of OPS (i18n needs). By the way, I'm using OPS 3.0 and eXist 20060316 snapshot. I 'upgraded' the eXist-related jar files of OPS, i.e. exist-*.jar, exist-optional-*.jar and xmldb-exist*.jar, hoping this would give me the latest features. Maybe this is what caused my problems :-) Cheers, -- Damiano ALBANI -- 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
|
Hi Damiano,
I can't comment on 1 and 2 as I don't have much experience using a non-embedded eXist. It would be interesting to see if you can reproduce those problems with the embedded eXist, and if you can, if you can create an example we can use to reproduce those problems. For 3, is this related to eXist or would you be able to reproduce this situation with just an XForms file that runs in the XForms sandbox. I tried some XForms using a "é" in an element name. It worked fine after I made sure that the encoding of the XML file actually matched the encoding declared in the <?xml version="1.0" encoding="..."?>. Alex On 3/18/06, Damiano Albani <[hidden email]> wrote: > Hello, > > I'm trying to use OPS with a non-embedded eXist database. I managed to > set up a datasource and it works (view + model using the xmldb > processor). But I've encountered some issues : > > 1/ the nodeset of xmldb processor output is sometimes empty for no > reason, even though the eXist database contains data. Resfreshing the > web page solves the problem but it's quite strange, as if the database > was suddenly empty... > > 2/ it looks like the output of xmldb processor has lost the namespace > information of the retrieved nodes. Is that an eXist issue ? I > couldn't have a look at the XML RPC response it sends to OPS because > it's base64-encoded. I'd like to be able to refer to my instance > elements using a QName, e.g. <xforms:output ref="tf:element"/>. > > 3/ there seems to be a problem with instance elements which have a > non-ASCII name. For example, in my view I have : > > <xforms:output ref="numéro"/> (notice the 'é', i.e. #xe9, letter) > > And when a DOMFocus event happens (i.e. I click) on this XForms > control, an error message appears at the top : > > XForms error: Fatal error: Element type "num" must be followed by > either attribute specifications, ">" or "/>". > > With 'num' being the first letters of 'numéro', up to the first > non-ASCII character. Is it a bug or a (known) limitation ? In the > second case, that would be a show-stopper to my use of OPS (i18n > needs). > > By the way, I'm using OPS 3.0 and eXist 20060316 snapshot. I > 'upgraded' the eXist-related jar files of OPS, i.e. exist-*.jar, > exist-optional-*.jar and xmldb-exist*.jar, hoping this would give me > the latest features. Maybe this is what caused my problems :-) > > Cheers, > > -- > Damiano ALBANI > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Damiano Albani-2
Hi Damiano,
I also had ran into problem 2 (namespaces not declared in the root element got lost) and reported this to a exist developer. The thing is this should be solved in the 20060316 snapshot, and it works for me. See changelog http://wiki.exist-db.org/space/Change+Log : ... Bug fixes * serializer ignored xmlns="" to clear default namespaces. ... Are you sure you are using the exist 20060316 database ? Greetings, Pepijn -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet Sent: dinsdag 21 maart 2006 1:23 To: [hidden email] Subject: Re: [ops-users] eXist XML database issues Hi Damiano, I can't comment on 1 and 2 as I don't have much experience using a non-embedded eXist. It would be interesting to see if you can reproduce those problems with the embedded eXist, and if you can, if you can create an example we can use to reproduce those problems. For 3, is this related to eXist or would you be able to reproduce this situation with just an XForms file that runs in the XForms sandbox. I tried some XForms using a "é" in an element name. It worked fine after I made sure that the encoding of the XML file actually matched the encoding declared in the <?xml version="1.0" encoding="..."?>. Alex On 3/18/06, Damiano Albani <[hidden email]> wrote: > Hello, > > I'm trying to use OPS with a non-embedded eXist database. I managed to > set up a datasource and it works (view + model using the xmldb > processor). But I've encountered some issues : > > 1/ the nodeset of xmldb processor output is sometimes empty for no > reason, even though the eXist database contains data. Resfreshing the > web page solves the problem but it's quite strange, as if the database > was suddenly empty... > > 2/ it looks like the output of xmldb processor has lost the namespace > information of the retrieved nodes. Is that an eXist issue ? I > couldn't have a look at the XML RPC response it sends to OPS because > it's base64-encoded. I'd like to be able to refer to my instance > elements using a QName, e.g. <xforms:output ref="tf:element"/>. > > 3/ there seems to be a problem with instance elements which have a > non-ASCII name. For example, in my view I have : > > <xforms:output ref="numéro"/> (notice the 'é', i.e. #xe9, letter) > > And when a DOMFocus event happens (i.e. I click) on this XForms > control, an error message appears at the top : > > XForms error: Fatal error: Element type "num" must be followed by > either attribute specifications, ">" or "/>". > > With 'num' being the first letters of 'numéro', up to the first > non-ASCII character. Is it a bug or a (known) limitation ? In the > second case, that would be a show-stopper to my use of OPS (i18n > needs). > > By the way, I'm using OPS 3.0 and eXist 20060316 snapshot. I > 'upgraded' the eXist-related jar files of OPS, i.e. exist-*.jar, > exist-optional-*.jar and xmldb-exist*.jar, hoping this would give me > the latest features. Maybe this is what caused my problems :-) > > Cheers, > > -- > Damiano ALBANI > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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 |
In reply to this post by Damiano Albani-2
Hello,
After doing *much* tweaking / trial-and-error, with your help, it eventually worked -- at least it seems up to now. So I can't really say where the errors came from :-) Yet, I've had the impression that my progressive changes in the model or view files were sometimes not taken into account by OPS, as if it hadn't manage to detected a file change... So that makes even more difficult to track down my mistakes :-) On point 2/ : My issue must have come from my little knowledge on eXist : I thought that, if I made a XQuery on nodes which have a namespace in the source XML file, this namespace would be carried over in the response. For example : -- source XML <test xmlns="http://www.site.com"> <sample/> </test> -- XQuery declare namespace ns = "http://www.site.com"; return //ns:test In that case, is the the result supposed to carry the namespace ? In my tests, it did not -- which means I have to enclose the result in a my own element : return <results xmlns="http://www.site.com"> { //ns:test } </results> Or maybe I'm plain wrong !? :-) Cheers, -- Damiano ALBANI -- 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 |
Hello,
I still have namespace related issues in OPS. Here's what I get in my instance as a results of an XQuery, dumped in my Web browser with <xi:include href="input:data"/> : <_0:results xml:base="input:data"> <_0:département id="1fbf07b8-0189-477a-ab11-95870d117b3e"> <_0:numéro>25</_0:numéro> <_0:nom>Doubs</_0:nom> </_0:département> <lignes></lignes> </_0:results> Strange, isn't it ? Especially compared to what eXist sends to OPS in its XML-RPC response : <results xmlns="http://www.transfrance.info/"> <département id="1fbf07b8-0189-477a-ab11-95870d117b3e"> <numéro>25</numéro> <nom>Doubs</nom> </département> <lignes/> </results> For information, my XQuery is : declare default element namespace "http://www.transfrance.info/"; declare namespace tfi = "http://www.transfrance.info/"; let $id := '<xsl:value-of select="//subject/text()"/>' let $departements := doc('/db/TransFrance/departements.xml')//tfi:département[@id = $id] let $lignes := <lignes> { //tfi:ligne[tfi:organisateur/@ref = $id] } </lignes> return <results> { $departements, $lignes } </results> Any idea ? I definately must be doing something wrong :-) -- Damiano ALBANI -- 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
|
In reply to this post by Damiano Albani-2
Hi Damiano,
On 3/21/06, Damiano Albani <[hidden email]> wrote: > -- source XML > <test xmlns="http://www.site.com"> > <sample/> > </test> > > -- XQuery > declare namespace ns = "http://www.site.com"; > return //ns:test > > In that case, is the the result supposed to carry the namespace ? In > my tests, it did not > -- which means I have to enclose the result in a > my own element : > > return > <results xmlns="http://www.site.com"> > { //ns:test } > </results> The fact that the namespace is there in this second example and that it was not there in the first seems to point towards an issue in eXist. I would ask the question on their mailing list. Alex -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
In reply to this post by Damiano Albani-2
Damiano,
On 3/23/06, Damiano Albani <[hidden email]> wrote: > <_0:results xml:base="input:data"> > <_0:département id="1fbf07b8-0189-477a-ab11-95870d117b3e"> > <_0:numéro>25</_0:numéro> > <_0:nom>Doubs</_0:nom> > </_0:département> > > <lignes></lignes> > </_0:results> Is this the document you are getting if you put a debug on the data output of xmldb-query? Alex -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Damiano,
On 3/24/06, Alessandro Vernet <[hidden email]> wrote: > Is this the document you are getting if you put a debug on the data > output of xmldb-query? BTW, as I was testing this, I moved our old sandbox to behave like the other sandboxes that leverage XForms NG. Of course, it will help if you can reproduce the problem in that sandbox. If you play with the sandbox, note that default namespaces are not displayed in the result, which is really just a display bug. Add a "debug" on the output xmldb-query in examples\sandbox\exist\run-query.xpl to see the document that is actually returned. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Alessandro Vernet
On 3/25/06, Alessandro Vernet <[hidden email]> wrote:
> The fact that the namespace is there in this second example and that > it was not there in the first seems to point towards an issue in > eXist. I would ask the question on their mailing list. I must admit my mistake, the namespace-related information is correctly handled and returned by eXist... -- Damiano ALBANI -- 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 |
In reply to this post by Alessandro Vernet
On 3/25/06, Alessandro Vernet <[hidden email]> wrote:
> Damiano, > > On 3/23/06, Damiano Albani <[hidden email]> wrote: > > <_0:results xml:base="input:data"> > > <_0:département id="1fbf07b8-0189-477a-ab11-95870d117b3e"> > > <_0:numéro>25</_0:numéro> > > <_0:nom>Doubs</_0:nom> > > </_0:département> > > > > <lignes></lignes> > > </_0:results> > > Is this the document you are getting if you put a debug on the data > output of xmldb-query? href="input:data"/> to populate my instance in my view.xsl file. Which is quite different from what is output of xmldb-query (doublechecked with the debug option as you told me) : <results xmlns="http://www.transfrance.info/"> <département id="1fbf07b8-0189-477a-ab11-95870d117b3e"> <numéro>25</numéro> <nom>Doubs</nom> </département> <lignes/> </results> So between these 2 XML tree, something has happened apparently. And I don't understand what -- and especially how :-) Cheers, -- Damiano ALBANI -- 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 |
I reply to myself :
It happens that using the debug="true" option on the processor output is a *much* better idea than with my awkward XInclude... And then, I found that the namespace information returned by eXist/OPS is, again, perfectly correct :-) -- Damiano ALBANI -- 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 |