Hi,
I knew how my documents "accumulate" namespace references as they pass through my pipelines, and particularly when they go out to a form and back. I do use "exclude-result-prefixes" in my xsl files, but I can't exclude namespaces the document actually needs to contain, which is why documents coming back from a form are particularly partial to them. I've been meaning to ask further on this, but it wasn't urgent. Now that I have 3.5 running, I thought I would make a renewed attempt to get XHTML output instead of HTML4. It looks better than with 3.0, except that the namespaces are coming through to the browser (I assume they are ones I caused, rather than something happening in the epilogue) and of course xmlns is not a valid attribute of an element in XHTML. So now I am more interested in finding an answer, if there is a way to remove excess namespace declarations from my documents in a pipeline (and even to stop them getting in there in the first place)? Thanks in advance regards Colin -- 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 knew how my documents "accumulate" namespace references as they > pass through my pipelines, and particularly when they go out to a > form and back. I do use "exclude-result-prefixes" in my xsl files, > but I can't exclude namespaces the document actually needs to > contain, which is why documents coming back from a form are > particularly partial to them. > > I've been meaning to ask further on this, but it wasn't urgent. Now > that I have 3.5 running, I thought I would make a renewed attempt to > get XHTML output instead of HTML4. It looks better than with 3.0, > except that the namespaces are coming through to the browser (I > assume they are ones I caused, rather than something happening in > the epilogue) and of course xmlns is not a valid attribute of an > element in XHTML. Which is a bug of XHTML, or of XHTML validators, IMO... XML 1.0 was not namespace-aware, and what we call today namespace declarations are strictly considered attributes by XML 1.0, but namespaces were introduced in 1999... And now, namespaces declartions are "reserved attributes", many XML tools not even considering them as attributes at all. So I think XHTML should definitely allow you to declare namespaces at will. But I digress ;-) > So now I am more interested in finding an answer, if there is a way > to remove excess namespace declarations from my documents in a > pipeline (and even to stop them getting in there in the first > place)? You can with XSLT, as XSLT supports handling namespace nodes explicitely. So you could write a sort of "filtering" stylesheet which you would place before serialization, and which would take out all the extra namespace declarations. -Erik -- 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 |
Hi Erik
thanks for the reply. On Mar 29, 2007, at 3:08 PM, Erik Bruchez wrote: > > So now I am more interested in finding an answer, if there is a way > > to remove excess namespace declarations from my documents in a > > pipeline (and even to stop them getting in there in the first > > place)? > > You can with XSLT, as XSLT supports handling namespace nodes > explicitely. So you could write a sort of "filtering" stylesheet which > you would place before serialization, and which would take out all the > extra namespace declarations. Hadn't come across that before. Great. In fact, I've tried the code that Steve Lenhart posted earlier today and that cleans things up nicely. So thanks to him as well! Best regards Colin -- 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 |
Hey gang,
I am trying to force a constraint on a password field where the value is: 1) 8+ characters long 2) contains a numeric number 3) atleast one uppercase character The first one is relatively easy: string-length(.) >= 8. But for the rest I can't find much information on testing for 1 character using XPath etc. Does anyone have any ideas? Thanks Naman NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. -- 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 Naman,
Regular expressions are your friends here. To check that the password contains at least on numeric character: matches(., '[0-9]'). To check that the password contains at least on uppercase character: matches(., '[A-Z]') So you can write: string-length(.) >= 8 and matches(., '[0-9]') and matches(., '[A-Z]') Alex On 3/29/07, Naman Joshi <[hidden email]> wrote: > Hey gang, > > I am trying to force a constraint on a password field where the value > is: > 1) 8+ characters long > 2) contains a numeric number > 3) atleast one uppercase character > > The first one is relatively easy: string-length(.) >= 8. But for the > rest I can't find much information on testing for 1 character using > XPath etc. > > Does anyone have any ideas? > > Thanks > Naman > > NOTICE > This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. > > > > -- > 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 2.0 Forms for the Enterprise 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 |
In reply to this post by Colin O'Brien
Hello Erik
sorry to revisit this. Of course, as soon as I started to work with this, I had another question... it's great to be able to clean up my documents like this, but keeping them clean will introduce extra processing... is there no way to make sure they don't get embedded in the documents (I use exclude-result-prefixes in my xsl, but I must be missing something). Anyway, now I have some documents clean and there seems to be no change in the results when I take the xhtml received by the browser and put it through the w3c validator - there are still the same namespaces as before. Doing some checking with debug / logging, I can see that what I am passing to the epilogue is clean. It's the epilogue processing that is leaving all these xmlns attributes in the output. Anything that can be done about this? Thanks & regards Colin On Mar 29, 2007, at 8:41 PM, Colin O'Brien wrote: > Hi Erik > > thanks for the reply. > > On Mar 29, 2007, at 3:08 PM, Erik Bruchez wrote: > >> > So now I am more interested in finding an answer, if there is a way >> > to remove excess namespace declarations from my documents in a >> > pipeline (and even to stop them getting in there in the first >> > place)? >> >> You can with XSLT, as XSLT supports handling namespace nodes >> explicitely. So you could write a sort of "filtering" stylesheet >> which >> you would place before serialization, and which would take out all >> the >> extra namespace declarations. > > Hadn't come across that before. > Great. > In fact, I've tried the code that Steve Lenhart posted earlier > today and that cleans things up nicely. > So thanks to him as well! > > Best regards > Colin > -- 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,
> Of course, as soon as I started to work with this, I had another > question... > it's great to be able to clean up my documents like this, but keeping > them clean will introduce extra processing... > is there no way to make sure they don't get embedded in the documents (I > use exclude-result-prefixes in my xsl, but I must be missing something). Yes, this is a command for the serializer, and will only work if you run XSLT from the command-line. When XSLT runs in an XML pipeline, the serialization information is not used at all. > Anyway, now I have some documents clean and there seems to be no change > in the results when I take the xhtml received by the browser and put it > through the w3c validator - there are still the same namespaces as before. > Doing some checking with debug / logging, I can see that what I am > passing to the epilogue is clean. > It's the epilogue processing that is leaving all these xmlns attributes > in the output. > > Anything that can be done about this? Where do you remove the namespaces? Don't you do this in the epilogue? -Erik -- 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 |
Hi Erik,
On Apr 5, 2007, at 6:15 PM, Erik Bruchez wrote: > Where do you remove the namespaces? Don't you do this in the epilogue? I try not to touch the epilogue, since it is something that comes with the system and maintaining customizations is a task I'd rather not have. I have added "cleaning" the namespaces to when I save data, since it seems that actual form processing is where most of the extraneous namespaces accumulate. Having said that, I have now edited the theme-plain.xsl (after I did edited epilogue-servlet.xpl) to add exclude-result-prefixes for all the namespaces declared there, and that cleaned up the xhtml going to the browser. Except for one. I still get <html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http:// www.w3.org/1999/xhtml"> Of course, theme-plain.xsl is still outputting all tags with an xhtml namespace, so it is given that it will still have the xmlns:xhtml. Some subsequent step is obviously doing the clean up to remove the namespace and output plain xhtml that an html browser can digest, but it seems it is omitting to remove the xmlns? Thanks & regards Colin -- 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 Erik
any more thoughts on this...? Thanks & regards Colin On Apr 6, 2007, at 11:09 AM, Colin O'Brien wrote: > I still get > <html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http:// > www.w3.org/1999/xhtml"> > Of course, theme-plain.xsl is still outputting all tags with an > xhtml namespace, so it is given that it will still have the > xmlns:xhtml. > Some subsequent step is obviously doing the clean up to remove the > namespace and output plain xhtml that an html browser can digest, > but it seems it is omitting to remove the xmlns? -- 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 all, There was a post about this before but
no-one replied. I am trying to do a simple query on a number of XML files
stored in a eXist db. I tried something like: <p:processor
name="oxf:xforms-submission"> <p:input
name="submission"> <xforms:submission
id="list-submission" method="get"
action="http://isd192.macbank:8070/exist/rest/db/mweb/requests?_query=/request[status='awaitingApproval']/> </p:input> <p:input
name="request"> <parameters/> </p:input> <p:output
name="response" ref="data" debug="true"/> </p:processor> If I try the link in a web-browser it
works fine. But in the log file I get this error message: Body received with
non-XML media type for replace="instance": text/html. I know I have
to enforce some content type or something but not sure what to do. I also tried something like: <p:processor
name="oxf:xforms-submission"> <p:input
name="submission"> <xforms:submission
id="list-submission" serialize="false" method="get"
action="http://isd192.macbank:8070/exist/rest/db/mweb/requests"
seperator="&"/> </p:input> <p:input
name="request"> <parameters> <_query>/request[status='awaitingApproval'</_query> </parameters> </p:input> <p:output
name="response" ref="data" debug="true"/> </p:processor> If I add the “serialize”
attribute I get an output of (Which I don’t know how to use): <exist:result xml:base="input:data" xmlns:exist="http://exist.sourceforge.net/NS/exist"> <exist:collection name="/db/mweb/requests" owner="admin" group="dba" permissions="rwurwurwu"> <exist:resource name="loadtest20070424122458-1.xml" created="2007-04-24T13:24:25.81+10:00" last-modified="2007-04-24T13:24:45.717+10:00" owner="admin" group="dba" permissions="rwur-ur-u"/> . . </exist:collection> </exist:result> I would prefer using the first method but not sure what
am I missing, any idea guys? Naman NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. -- 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 Colin O'Brien
Hi Colin,
Sorry, this was a long thread, and I am not sure what the outstanding issue is. Would you care to summarize it for us? Alex On 4/23/07, Colin O'Brien <[hidden email]> wrote: > Hi Erik > > any more thoughts on this...? > > Thanks & regards > Colin > > On Apr 6, 2007, at 11:09 AM, Colin O'Brien wrote: > > > I still get > > <html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http:// > > www.w3.org/1999/xhtml"> > > Of course, theme-plain.xsl is still outputting all tags with an > > xhtml namespace, so it is given that it will still have the > > xmlns:xhtml. > > Some subsequent step is obviously doing the clean up to remove the > > namespace and output plain xhtml that an html browser can digest, > > but it seems it is omitting to remove the xmlns? > > > > > -- > 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 2.0 Forms for the Enterprise 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 |
Administrator
|
In reply to this post by NJ No1
Hi Naman,
We would need to figure out what is returned by eXist. Most likely eXist is returning HTML with an error message, rather than the <exist:result> you expect. I can suggest two ways to debug this: 1. My favorite: use the Apache TCPMon (http://ws.apache.org/commons/tcpmon/). If you have never used this tool before, take the time to install it and set it up. It is a simple tool, but is worth it weight in gold! 2. Use replace="all" instead of replace="instance", so whatever is returned by eXist will just be displayed in the page. Also, you don't need the seperator="&" since you have serialize="false". Alex On 4/23/07, Naman Joshi <[hidden email]> wrote: > > > > > Hi all, > > > > There was a post about this before but no-one replied. I am trying to do a > simple query on a number of XML files stored in a eXist db. I tried > something like: > > > > <p:processor name="oxf:xforms-submission"> > > <p:input name="submission"> > > <xforms:submission id="list-submission" > > method="get" > action="http://isd192.macbank:8070/exist/rest/db/mweb/requests?_query=/request[status='awaitingApproval']/> > > </p:input> > > <p:input name="request"> > > <parameters/> > > </p:input> > > <p:output name="response" ref="data" debug="true"/> > > </p:processor> > > > > If I try the link in a web-browser it works fine. But in the log file I get > this error message: Body received with non-XML media type for > replace="instance": text/html. I know I have to enforce some content type or > something but not sure what to do. > > > > I also tried something like: > > > > <p:processor name="oxf:xforms-submission"> > > <p:input name="submission"> > > <xforms:submission id="list-submission" serialize="false" > > method="get" > action="http://isd192.macbank:8070/exist/rest/db/mweb/requests" > seperator="&"/> > > </p:input> > > <p:input name="request"> > > <parameters> > > > <_query>/request[status='awaitingApproval'</_query> > > </parameters> > > </p:input> > > <p:output name="response" ref="data" debug="true"/> > > </p:processor> > > > > If I add the "serialize" attribute I get an output of (Which I don't know > how to use): > > > > <exist:result xml:base="input:data" > xmlns:exist="http://exist.sourceforge.net/NS/exist"> > > <exist:collection name="/db/mweb/requests" owner="admin" group="dba" > permissions="rwurwurwu"> > > <exist:resource name="loadtest20070424122458-1.xml" > created="2007-04-24T13:24:25.81+10:00" > last-modified="2007-04-24T13:24:45.717+10:00" owner="admin" group="dba" > permissions="rwur-ur-u"/> > > . > > . > > </exist:collection> > > </exist:result> > > > > > > I would prefer using the first method but not sure what am I missing, any > idea guys? > > > > Naman > > NOTICE > > This e-mail and any attachments are confidential and may contain copyright > material of Macquarie Bank or third parties. If you are not the intended > recipient of this email you should not read, print, re-transmit, store or > act in reliance on this e-mail or any attachments, and should destroy all > copies of them. Macquarie Bank does not guarantee the integrity of any > emails or any attached files. The views or opinions expressed are the > author's own and may not reflect the views or opinions of Macquarie Bank. > > -- > 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 2.0 Forms for the Enterprise 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 |
Hi Alex, I installed the program and when I do this: <p:processor name="oxf:xforms-submission"> <p:input name="submission"> <xforms:submission id="list-submission"
serialize="false" method="get"
action="http://localhost:8060/exist/rest/db/mweb/requests?_query=/request[status='awaitingApproval']"
/> </p:input> <p:input name="request"> <parameters/> </p:input> <p:output name="response" ref="data"
debug="true"/> </p:processor> In TCPMon I get: HTTP/1.1 200 OK Date: Thu, 26 Apr 2007 00:51:34 GMT Server: Jetty/5.0.0 (Linux/2.6.11-1.1369_FC4 i386 java/1.5.0_10) Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: JSESSIONID=hu8cvuilalfo;path=/exist Last-Modified: Thu, 26 Apr 2007 00:24:43 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked 318 <exist:result
xmlns:exist="http://exist.sourceforge.net/NS/exist"
exist:hits="1" exist:start="1"
exist:count="1"> <request
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:context="java:org.orbeon.oxf.pipeline.StaticExternalContext"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xforms="http://www.w3.org/2002/xforms"> <status>awaitingApproval</status> <timestamp>Thu Apr 12 10:14:55 EST 2007</timestamp> <txid>fxue112042007001436</txid> <auth>fxue1</auth> <workflow>WebserverBuilderDemo</workflow> <target>www.test.com.au-webserver-ecsydtst03</target> <action>start</action> <data/> <result/> </request></exist:result> 0 If I add the replace=”all” I don’t get anything in
TCPMon!? Thanks Naman -----Original Message----- Hi Naman, We would need to figure out what is returned by eXist. Most likely eXist is returning HTML with an error message, rather than the <exist:result> you expect. I can suggest two ways to debug this: 1. My favorite: use the Apache TCPMon (http://ws.apache.org/commons/tcpmon/). If you have never used this tool before, take the time to install it and set it up. It is a simple tool, but is worth it weight in gold! 2. Use replace="all" instead of replace="instance",
so whatever is returned by eXist will just be displayed in the page. Also, you don't need the seperator="&" since you have
serialize="false". Alex On 4/23/07, Naman Joshi <[hidden email]> wrote: > > > > > Hi all, > > > > There was a post about this before but no-one replied. I am trying
to do a > simple query on a number of XML files stored in a eXist db. I
tried > something like: > > > > <p:processor name="oxf:xforms-submission"> > > <p:input name="submission"> > > <xforms:submission
id="list-submission" > > method="get" >
action="http://isd192.macbank:8070/exist/rest/db/mweb/requests?_query=/request[status='awaitingApproval']/> > > </p:input> > > <p:input name="request"> > > <parameters/> > > </p:input> > > <p:output name="response"
ref="data" debug="true"/> > > </p:processor> > > > > If I try the link in a web-browser it works fine. But in the log
file I get > this error message: Body received with non-XML media type for > replace="instance": text/html. I know I have to enforce
some content type or > something but not sure what to do. > > > > I also tried something like: > > > > <p:processor name="oxf:xforms-submission"> > > <p:input name="submission"> > > <xforms:submission
id="list-submission" serialize="false" > > method="get" >
action="http://isd192.macbank:8070/exist/rest/db/mweb/requests" > seperator="&"/> > > </p:input> > > <p:input name="request"> > > <parameters> > > > <_query>/request[status='awaitingApproval'</_query> > > </parameters> > > </p:input> > > <p:output name="response"
ref="data" debug="true"/> > > </p:processor> > > > > If I add the "serialize" attribute I get an output of
(Which I don't know > how to use): > > > > <exist:result xml:base="input:data" > xmlns:exist="http://exist.sourceforge.net/NS/exist"> > > <exist:collection name="/db/mweb/requests"
owner="admin" group="dba" > permissions="rwurwurwu"> > > <exist:resource name="loadtest20070424122458-1.xml" > created="2007-04-24T13:24:25.81+10:00" > last-modified="2007-04-24T13:24:45.717+10:00"
owner="admin" group="dba" > permissions="rwur-ur-u"/> > > . > > . > > </exist:collection> > > </exist:result> > > > > > > I would prefer using the first method but not sure what am I
missing, any > idea guys? > > > > Naman > > NOTICE > > This e-mail and any attachments are confidential and may contain
copyright > material of Macquarie Bank or third parties. If you are not the
intended > recipient of this email you should not read, print, re-transmit,
store or > act in reliance on this e-mail or any attachments, and should
destroy all > copies of them. Macquarie Bank does not guarantee the integrity of
any > emails or any attached files. The views or opinions expressed are
the > author's own and may not reflect the views or opinions of
Macquarie Bank. > > -- > 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 2.0 Forms for the Enterprise 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 |
Administrator
|
Hi Naman,
I see: you are hitting a bug in eXist, where the response to a query sent with a GET has the wrong content type. I have been lobbying :) for this bug to be fixed, and it has been fixed last month. See the link below for the reference to that eXist bug. Unfortunately, the most recent release of eXist predates this fix. So you have 2 choices: 1. Get the source of eXist, and compile it for yourself. On the plus side, it is fairly simple to compile eXist. 2. Use a POST instead of a GET. For this you need to have a document that contains the <exist:query>, so it is more verbose, but you have this only in just one place, the added verbosity might be acceptable for you. http://sourceforge.net/tracker/index.php?func=detail&aid=1597406&group_id=17691&atid=117691 Alex On 4/25/07, Naman Joshi <[hidden email]> wrote: > > > > > Hi Alex, > > > > I installed the program and when I do this: > > > > <p:processor name="oxf:xforms-submission"> > > <p:input name="submission"> > > <xforms:submission id="list-submission" serialize="false" > > method="get" > action="http://localhost:8060/exist/rest/db/mweb/requests?_query=/request[status='awaitingApproval']" > /> > > </p:input> > > <p:input name="request"> > > <parameters/> > > </p:input> > > <p:output name="response" ref="data" debug="true"/> > > </p:processor> > > > > In TCPMon I get: > > > > HTTP/1.1 200 OK > > Date: Thu, 26 Apr 2007 00:51:34 GMT > > Server: Jetty/5.0.0 (Linux/2.6.11-1.1369_FC4 i386 java/1.5.0_10) > > Expires: Thu, 01 Jan 1970 00:00:00 GMT > > Set-Cookie: JSESSIONID=hu8cvuilalfo;path=/exist > > Last-Modified: Thu, 26 Apr 2007 00:24:43 GMT > > Content-Type: text/html; charset=UTF-8 > > Transfer-Encoding: chunked > > > > 318 > > <exist:result > xmlns:exist="http://exist.sourceforge.net/NS/exist" > exist:hits="1" exist:start="1" exist:count="1"> > > <request > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:context="java:org.orbeon.oxf.pipeline.StaticExternalContext" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:saxon="http://saxon.sf.net/" > xmlns:xforms="http://www.w3.org/2002/xforms"> > > <status>awaitingApproval</status> > > <timestamp>Thu Apr 12 10:14:55 EST 2007</timestamp> > > <txid>fxue112042007001436</txid> > > <auth>fxue1</auth> > > <workflow>WebserverBuilderDemo</workflow> > > <target>www.test.com.au-webserver-ecsydtst03</target> > > <action>start</action> > > <data/> > > <result/> > > </request></exist:result> > > 0 > > > > > > If I add the replace="all" I don't get anything in TCPMon!? > > > > Thanks > > Naman > > > > > > > > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro > Vernet > Sent: Wednesday, 25 April 2007 4:17 AM > To: [hidden email] > Subject: Re: [ops-users] Accessing eXist REST from xforms-submission > processor > > > > Hi Naman, > > > > We would need to figure out what is returned by eXist. Most likely > > eXist is returning HTML with an error message, rather than the > > <exist:result> you expect. I can suggest two ways to debug this: > > > > 1. My favorite: use the Apache TCPMon > > (http://ws.apache.org/commons/tcpmon/). If you have never > used this > > tool before, take the time to install it and set it up. It is a simple > > tool, but is worth it weight in gold! > > > > 2. Use replace="all" instead of replace="instance", so whatever is > > returned by eXist will just be displayed in the page. > > > > Also, you don't need the seperator="&" since you have serialize="false". > > > > Alex > > > > On 4/23/07, Naman Joshi <[hidden email]> wrote: > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > There was a post about this before but no-one replied. I am trying to do a > > > simple query on a number of XML files stored in a eXist db. I tried > > > something like: > > > > > > > > > > > > <p:processor name="oxf:xforms-submission"> > > > > > > <p:input name="submission"> > > > > > > <xforms:submission id="list-submission" > > > > > > method="get" > > > > action="http://isd192.macbank:8070/exist/rest/db/mweb/requests?_query=/request[status='awaitingApproval']/> > > > > > > </p:input> > > > > > > <p:input name="request"> > > > > > > <parameters/> > > > > > > </p:input> > > > > > > <p:output name="response" ref="data" debug="true"/> > > > > > > </p:processor> > > > > > > > > > > > > If I try the link in a web-browser it works fine. But in the log file I > get > > > this error message: Body received with non-XML media type for > > > replace="instance": text/html. I know I have to enforce some content type > or > > > something but not sure what to do. > > > > > > > > > > > > I also tried something like: > > > > > > > > > > > > <p:processor name="oxf:xforms-submission"> > > > > > > <p:input name="submission"> > > > > > > <xforms:submission id="list-submission" > serialize="false" > > > > > > method="get" > > > > action="http://isd192.macbank:8070/exist/rest/db/mweb/requests" > > > seperator="&"/> > > > > > > </p:input> > > > > > > <p:input name="request"> > > > > > > <parameters> > > > > > > > > > <_query>/request[status='awaitingApproval'</_query> > > > > > > </parameters> > > > > > > </p:input> > > > > > > <p:output name="response" ref="data" debug="true"/> > > > > > > </p:processor> > > > > > > > > > > > > If I add the "serialize" attribute I get an output of (Which I don't know > > > how to use): > > > > > > > > > > > > <exist:result xml:base="input:data" > > > xmlns:exist="http://exist.sourceforge.net/NS/exist"> > > > > > > <exist:collection name="/db/mweb/requests" owner="admin" group="dba" > > > permissions="rwurwurwu"> > > > > > > <exist:resource name="loadtest20070424122458-1.xml" > > > created="2007-04-24T13:24:25.81+10:00" > > > last-modified="2007-04-24T13:24:45.717+10:00" > owner="admin" group="dba" > > > permissions="rwur-ur-u"/> > > > > > > . > > > > > > . > > > > > > </exist:collection> > > > > > > </exist:result> > > > > > > > > > > > > > > > > > > I would prefer using the first method but not sure what am I missing, any > > > idea guys? > > > > > > > > > > > > Naman > > > > > > NOTICE > > > > > > This e-mail and any attachments are confidential and may contain copyright > > > material of Macquarie Bank or third parties. If you are not the intended > > > recipient of this email you should not read, print, re-transmit, store or > > > act in reliance on this e-mail or any attachments, and should destroy all > > > copies of them. Macquarie Bank does not guarantee the integrity of any > > > emails or any attached files. The views or opinions expressed are the > > > author's own and may not reflect the views or opinions of Macquarie Bank. > > > > > > -- > > > 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 2.0 Forms for the Enterprise > > 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 > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise 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 |