doc-available not behaving as it should...

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

doc-available not behaving as it should...

Eric van der Vlist
Hi,

When I run

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  version="2.0">
    <xsl:template match="/">
        <result>
            <xsl:value-of select="doc-available('http://example.com/foo')"/>
        </result>
    </xsl:template>
</xsl:transform>

with oXygen, I get

<result>false</result>

which is what I am expecting, but if I run the same transformation in
OrbeonForms (for instance in the XSLT sandbox), I get

<result>true</result>

Why do I get this weird result and how can I get what I am expecting?

Thanks,

Eric


--
GPG-PGP: 2A528005
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


--
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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: doc-available not behaving as it should...

Erik Bruchez
Administrator
Eric,

I reproduce this.

I think the reason is that loading document 'http://example.com/foo' 
actually succeeds, in a way: the resulting document contains an error  
HTML page converted to XML.

We give Saxon our own URI resolver, which works by using the URL  
generator, which happens to ignore reception of a 404 and proceeds  
with parsing the response.

I suppose that this is a bug. Probably that  
URLGenerator.ResourceHandler should be extended to check the status  
code, and throw an exception then. I have entered a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=308820&group_id=168&atid=350207

-Erik

On Mar 10, 2008, at 4:12 PM, Eric van der Vlist wrote:

> Hi,
>
> When I run
>
> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
> version="2.0">
>    <xsl:template match="/">
>        <result>
>            <xsl:value-of select="doc-available('http://example.com/foo')
> "/>
>        </result>
>    </xsl:template>
> </xsl:transform>
>
> with oXygen, I get
>
> <result>false</result>
>
> which is what I am expecting, but if I run the same transformation in
> OrbeonForms (for instance in the XSLT sandbox), I get
>
> <result>true</result>
>
> Why do I get this weird result and how can I get what I am expecting?
>
> Thanks,
>
> Eric
>
>
> --
> GPG-PGP: 2A528005
> Le premier annuaire des apiculteurs 100% XML!
>                                                http://
> apiculteurs.info/
> ------------------------------------------------------------------------
> Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
> (ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
> (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
> ------------------------------------------------------------------------
--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: doc-available not behaving as it should...

Eric van der Vlist

Le lundi 10 mars 2008 à 17:44 -0700, Erik Bruchez a écrit :
> Eric,
>
> I reproduce this.
>
> I think the reason is that loading document 'http://example.com/foo' 
> actually succeeds, in a way: the resulting document contains an error  
> HTML page converted to XML.

Hmmm, I see...

That means that as a workaround if you know that the page will be the
default 404 page for your favorite web server you can check if a page
with let's say its title is returned...

> We give Saxon our own URI resolver, which works by using the URL  
> generator, which happens to ignore reception of a 404 and proceeds  
> with parsing the response.
>
> I suppose that this is a bug. Probably that  
> URLGenerator.ResourceHandler should be extended to check the status  
> code, and throw an exception then.

Yes, that would be more coherent I think.

> I have entered a bug to track this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=308820&group_id=168&atid=350207

Thanks.

Eric

--
GPG-PGP: 2A528005
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


--
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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

do you plan to solve this in a while? ;-) http://forge.objectweb.org/tracker/index.php?func=detail&aid=308380&group_id=168&atid=350207

richhl
In reply to this post by Erik Bruchez
thx in advance!!!!!!!!

rich


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

Re: do you plan to solve this in a while? ;-) http://forge.objectweb.org/tracker/index.php?func=detail&aid=308380&group_id=168&atid=350207

Erik Bruchez
Administrator
We hope to fix this one sooner rather than later:

http://forge.objectweb.org/tracker/?group_id=168&atid=350207&func=detail&aid=306602

Fixing that one may fix the bug you are indicating as well, at least  
it will make it easier to fix.

-Erik

On Mar 11, 2008, at 2:19 AM, Richard C. Hidalgo Lorite wrote:

> thx in advance!!!!!!!!
>
> rich

--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: do you plan to solve this in a while? ;-) http://forge.objectweb.org/tracker/index.php?func=detail&aid=308380&group_id=168&atid=350207

Erik Bruchez
Administrator
In reply to this post by richhl
So that's fixed now :-)

-Erik

On Mar 11, 2008, at 2:19 AM, Richard C. Hidalgo Lorite wrote:

> thx in advance!!!!!!!!
>
> rich

--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: doc-available not behaving as it should...

Erik Bruchez
Administrator
In reply to this post by Eric van der Vlist
This bug is now fixed.

-Erik

2008/3/11 Eric van der Vlist <[hidden email]>:

>
> Le lundi 10 mars 2008 à 17:44 -0700, Erik Bruchez a écrit :
>> Eric,
>>
>> I reproduce this.
>>
>> I think the reason is that loading document 'http://example.com/foo'
>> actually succeeds, in a way: the resulting document contains an error
>> HTML page converted to XML.
>
> Hmmm, I see...
>
> That means that as a workaround if you know that the page will be the
> default 404 page for your favorite web server you can check if a page
> with let's say its title is returned...
>
>> We give Saxon our own URI resolver, which works by using the URL
>> generator, which happens to ignore reception of a 404 and proceeds
>> with parsing the response.
>>
>> I suppose that this is a bug. Probably that
>> URLGenerator.ResourceHandler should be extended to check the status
>> code, and throw an exception then.
>
> Yes, that would be more coherent I think.
>
>> I have entered a bug to track this:
>>
>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=308820&group_id=168&atid=350207
>
> Thanks.
>
> Eric
>
> --
> GPG-PGP: 2A528005
> Le premier annuaire des apiculteurs 100% XML!
>                                                http://apiculteurs.info/
> ------------------------------------------------------------------------
> Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
> (ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
> (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
> ------------------------------------------------------------------------
>
>
> --
> 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