Issues in WADL stylesheet when referencing faults or methods

View: New views
6 Messages — Rating Filter:   Alert me  

Issues in WADL stylesheet when referencing faults or methods

by Yves Saintillan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Issues in WADL stylesheet when referencing faults or methods

Hello,

I am using the WADL XSL stylesheet and noticed a couple of issues when referencing faults or methods in a WADL:

- When making a reference (href) to a Fault, defined directly  under the application element, the fault is not correctly displayed in the HTML output; in particular, the status of the fault (in the reference or in the definition) does not appear.

- Similarly, when making reference to a method, defined directly under the application element, the name of the method is not displayed in the HTML documentation.

So it seems the XSL stylesheet handles well references to representations, but not faults or methods. Are you aware of these issues ?

Thanks and kind regards,
Yves


Re: Issues in WADL stylesheet when referencing faults or methods

by mnot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Could you provide sample input that triggers this?

Thanks,


On 22/11/2008, at 4:26 AM, SAINTILLAN YVES wrote:

> Hello,
>
> I am using the WADL XSL stylesheet and noticed a couple of issues  
> when referencing faults or methods in a WADL:
>
> - When making a reference (href) to a Fault, defined directly  under  
> the application element, the fault is not correctly displayed in the  
> HTML output; in particular, the status of the fault (in the  
> reference or in the definition) does not appear.
>
> - Similarly, when making reference to a method, defined directly  
> under the application element, the name of the method is not  
> displayed in the HTML documentation.
>
> So it seems the XSL stylesheet handles well references to  
> representations, but not faults or methods. Are you aware of these  
> issues ?
>
> Thanks and kind regards,
> Yves
>


--
Mark Nottingham     http://www.mnot.net/



RE: Issues in WADL stylesheet when referencing faults or methods

by Yves Saintillan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Dear Mark,

Sure: please find attached a modified version of WADL for Yahoo
NewsSearch application, that allows to reproduce both issues. In the
WADL, the 'GET' method and 'SearchError' fault elements are both defined
as children of the application element.

Included XSD files, and generated HTML output documentation are also
attached.

Thanks,
Yves

-----Original Message-----
From: Mark Nottingham [mailto:mnot@...]
Sent: samedi 22 novembre 2008 17:51
To: SAINTILLAN YVES
Cc: public-web-http-desc@...
Subject: Re: Issues in WADL stylesheet when referencing faults or
methods

Could you provide sample input that triggers this?

Thanks,


On 22/11/2008, at 4:26 AM, SAINTILLAN YVES wrote:

> Hello,
>
> I am using the WADL XSL stylesheet and noticed a couple of issues when

> referencing faults or methods in a WADL:
>
> - When making a reference (href) to a Fault, defined directly  under
> the application element, the fault is not correctly displayed in the
> HTML output; in particular, the status of the fault (in the reference
> or in the definition) does not appear.
>
> - Similarly, when making reference to a method, defined directly under

> the application element, the name of the method is not displayed in
> the HTML documentation.
>
> So it seems the XSL stylesheet handles well references to
> representations, but not faults or methods. Are you aware of these
> issues ?
>
> Thanks and kind regards,
> Yves
>

--
Mark Nottingham     http://www.mnot.net/





My Web Application

My Web Application

Resources

Yahoo News Search Service

The Yahoo News Search service provides online searching of news stories from around the world.

Methods

request query parameters
parameter value description

appid

string (required)

The application ID. See Application IDs for more information.

query

string (required)

type

string

One of:

  • all (default)
  • any
  • phrase
all (default)

All query terms.

any

Any query terms.

phrase

Query terms as a phrase.

results

int

Default: 10

start

int

Default: 1

sort

string

One of:

  • rank (default)
  • date

language

string

output

string

One of:

  • xml (default)
  • json
  • php

The format for the output. If json is requested, the results will be returned in JSON format. If php is requested, the results will be returned in Serialized PHP format.

callback

string

The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the Yahoo! Developer Network JSON Documentation.

available response representations:

potential faults:

Representations

A list of news items matching the query (application/xml - yn:ResultSet)

XML Schema

Source: NewsSearchResponse.xsd

<xs:element name="ResultSet">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Result" type="ResultType" minOccurs="0" maxOccurs="50"/>
      </xs:sequence>
      <xs:attribute name="totalResultsAvailable" type="xs:integer"/>
      <xs:attribute name="totalResultsReturned" type="xs:integer"/>
      <xs:attribute name="firstResultPosition" type="xs:integer"/>
    </xs:complexType>
  </xs:element>

Faults

application/xml (ya:Error)

XML Schema

Source: NewsSearchError.xsd

<xs:element name="Error">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element name="Message"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

YahooSearch.wadl (5K) Download Attachment
NewsSearchError.xsd (998 bytes) Download Attachment
NewsSearchResponse.xsd (2K) Download Attachment

Re: Issues in WADL stylesheet when referencing faults or methods

by mnot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Fixed; some attributes weren't copied when expanding references. I may  
have missed some more, and there's hopefully a more elegant way to do  
it, but these problems should be gone, at least.

Cheers,


On 24/11/2008, at 10:13 PM, SAINTILLAN YVES wrote:

> Dear Mark,
>
> Sure: please find attached a modified version of WADL for Yahoo
> NewsSearch application, that allows to reproduce both issues. In the
> WADL, the 'GET' method and 'SearchError' fault elements are both  
> defined
> as children of the application element.
>
> Included XSD files, and generated HTML output documentation are also
> attached.
>
> Thanks,
> Yves
>
> -----Original Message-----
> From: Mark Nottingham [mailto:mnot@...]
> Sent: samedi 22 novembre 2008 17:51
> To: SAINTILLAN YVES
> Cc: public-web-http-desc@...
> Subject: Re: Issues in WADL stylesheet when referencing faults or
> methods
>
> Could you provide sample input that triggers this?
>
> Thanks,
>
>
> On 22/11/2008, at 4:26 AM, SAINTILLAN YVES wrote:
>
>> Hello,
>>
>> I am using the WADL XSL stylesheet and noticed a couple of issues  
>> when
>
>> referencing faults or methods in a WADL:
>>
>> - When making a reference (href) to a Fault, defined directly  under
>> the application element, the fault is not correctly displayed in the
>> HTML output; in particular, the status of the fault (in the reference
>> or in the definition) does not appear.
>>
>> - Similarly, when making reference to a method, defined directly  
>> under
>
>> the application element, the name of the method is not displayed in
>> the HTML documentation.
>>
>> So it seems the XSL stylesheet handles well references to
>> representations, but not faults or methods. Are you aware of these
>> issues ?
>>
>> Thanks and kind regards,
>> Yves
>>
>
>
> --
> Mark Nottingham     http://www.mnot.net/
>




My Web Application

My Web Application

Resources

Yahoo News Search Service

The Yahoo News Search service provides online searching of news stories from around the world.

Methods

request query parameters
parameter value description

appid

string (required)

The application ID. See Application IDs for more information.

query

string (required)

type

string

One of:

  • all (default)
  • any
  • phrase
all (default)

All query terms.

any

Any query terms.

phrase

Query terms as a phrase.

results

int

Default: 10

start

int

Default: 1

sort

string

One of:

  • rank (default)
  • date

language

string

output

string

One of:

  • xml (default)
  • json
  • php

The format for the output. If json is requested, the results will be returned in JSON format. If php is requested, the results will be returned in Serialized PHP format.

callback

string

The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the Yahoo! Developer Network JSON Documentation.

available response representations:

potential faults:

Representations

A list of news items matching the query (application/xml - yn:ResultSet)

XML Schema

Source: NewsSearchResponse.xsd

<xs:element name="ResultSet">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Result" type="ResultType" minOccurs="0" maxOccurs="50"/>
      </xs:sequence>
      <xs:attribute name="totalResultsAvailable" type="xs:integer"/>
      <xs:attribute name="totalResultsReturned" type="xs:integer"/>
      <xs:attribute name="firstResultPosition" type="xs:integer"/>
    </xs:complexType>
  </xs:element>

Faults

application/xml (ya:Error)

XML Schema

Source: NewsSearchError.xsd

<xs:element name="Error">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element name="Message"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>



--
Mark Nottingham     http://www.mnot.net/


YahooSearch.wadl (6K) Download Attachment
NewsSearchError.xsd (748 bytes) Download Attachment
NewsSearchResponse.xsd (2K) Download Attachment

RE: Issues in WADL stylesheet when referencing faults or methods

by Yves Saintillan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Mark,
Thanks a lot for fixing this, and best wishes for the new year!

I have now a couple of other issues with the stylesheet:

- When a WADL resource makes use of the 'type' attribute to refer to a resource_type element, the documentation does not display correctly the URI of the corresponding resource: only the base URI is displayed. For example, I have modified the previous WADL (see in attachment), so that the resource with path 'newsSearch' makes reference to a resource_type 'searchResourceType'; in the generated documentation (also attached), the relative path 'newsSearch' is missing from the resource URI.

- My other issue is about the queryType attribute of a resource element (which is optional and defaults to application/x-www-form-urlencoded): it seems this attribute is ignored by the stylesheet and does not appear in the generated documentation; is there a particular reason for this ?

Thanks and kind regards,
Yves

-----Original Message-----
From: Mark Nottingham [mailto:mnot@...]
Sent: mardi 9 décembre 2008 12:34
To: SAINTILLAN YVES
Cc: public-web-http-desc@...
Subject: Re: Issues in WADL stylesheet when referencing faults or methods

Fixed; some attributes weren't copied when expanding references. I may have missed some more, and there's hopefully a more elegant way to do it, but these problems should be gone, at least.

Cheers,


On 24/11/2008, at 10:13 PM, SAINTILLAN YVES wrote:

> Dear Mark,
>
> Sure: please find attached a modified version of WADL for Yahoo
> NewsSearch application, that allows to reproduce both issues. In the
> WADL, the 'GET' method and 'SearchError' fault elements are both
> defined as children of the application element.
>
> Included XSD files, and generated HTML output documentation are also
> attached.
>
> Thanks,
> Yves
>
> -----Original Message-----
> From: Mark Nottingham [mailto:mnot@...]
> Sent: samedi 22 novembre 2008 17:51
> To: SAINTILLAN YVES
> Cc: public-web-http-desc@...
> Subject: Re: Issues in WADL stylesheet when referencing faults or
> methods
>
> Could you provide sample input that triggers this?
>
> Thanks,
>
>
> On 22/11/2008, at 4:26 AM, SAINTILLAN YVES wrote:
>
>> Hello,
>>
>> I am using the WADL XSL stylesheet and noticed a couple of issues
>> when
>
>> referencing faults or methods in a WADL:
>>
>> - When making a reference (href) to a Fault, defined directly  under
>> the application element, the fault is not correctly displayed in the
>> HTML output; in particular, the status of the fault (in the reference
>> or in the definition) does not appear.
>>
>> - Similarly, when making reference to a method, defined directly
>> under
>
>> the application element, the name of the method is not displayed in
>> the HTML documentation.
>>
>> So it seems the XSL stylesheet handles well references to
>> representations, but not faults or methods. Are you aware of these
>> issues ?
>>
>> Thanks and kind regards,
>> Yves
>>
>
>
> --
> Mark Nottingham     http://www.mnot.net/
>


My Web Application

My Web Application

Resources

Yahoo News Search Service

The Yahoo News Search service provides online searching of news stories from around the world.

Methods

GET

request query parameters
parameter value description

appid

string (required)

The application ID. See Application IDs for more information.

query

string (required)

type

string

One of:

  • all (default)
  • any
  • phrase
all (default)

All query terms.

any

Any query terms.

phrase

Query terms as a phrase.

results

int

Default: 10

start

int

Default: 1

sort

string

One of:

  • rank (default)
  • date

language

string

output

string

One of:

  • xml (default)
  • json
  • php

The format for the output. If json is requested, the results will be returned in JSON format. If php is requested, the results will be returned in Serialized PHP format.

callback

string

The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the Yahoo! Developer Network JSON Documentation.

available response representations:

potential faults:

Representations

A list of news items matching the query (application/xml - yn:ResultSet)

XML Schema

Source: NewsSearchResponse.xsd

<xs:element name="ResultSet">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Result" type="ResultType" minOccurs="0" maxOccurs="50"/>
      </xs:sequence>
      <xs:attribute name="totalResultsAvailable" type="xs:integer"/>
      <xs:attribute name="totalResultsReturned" type="xs:integer"/>
      <xs:attribute name="firstResultPosition" type="xs:integer"/>
    </xs:complexType>
  </xs:element>

Faults

Status Code 400 - application/xml (ya:Error)

XML Schema

Source: NewsSearchError.xsd

<xs:element name="Error">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element name="Message"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

YahooSearch.wadl (5K) Download Attachment

Re: Issues in WADL stylesheet when referencing faults or methods

by mnot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I've applied the patch that Yves sent to me privately -- many thanks  
(and sorry for the delay).

Cheers,


On 07/01/2009, at 4:03 AM, SAINTILLAN YVES wrote:

> Mark,
> Thanks a lot for fixing this, and best wishes for the new year!
>
> I have now a couple of other issues with the stylesheet:
>
> - When a WADL resource makes use of the 'type' attribute to refer to  
> a resource_type element, the documentation does not display  
> correctly the URI of the corresponding resource: only the base URI  
> is displayed. For example, I have modified the previous WADL (see in  
> attachment), so that the resource with path 'newsSearch' makes  
> reference to a resource_type 'searchResourceType'; in the generated  
> documentation (also attached), the relative path 'newsSearch' is  
> missing from the resource URI.
>
> - My other issue is about the queryType attribute of a resource  
> element (which is optional and defaults to application/x-www-form-
> urlencoded): it seems this attribute is ignored by the stylesheet  
> and does not appear in the generated documentation; is there a  
> particular reason for this ?
>
> Thanks and kind regards,
> Yves
>
> -----Original Message-----
> From: Mark Nottingham [mailto:mnot@...]
> Sent: mardi 9 décembre 2008 12:34
> To: SAINTILLAN YVES
> Cc: public-web-http-desc@...
> Subject: Re: Issues in WADL stylesheet when referencing faults or  
> methods
>
> Fixed; some attributes weren't copied when expanding references. I  
> may have missed some more, and there's hopefully a more elegant way  
> to do it, but these problems should be gone, at least.
>
> Cheers,
>
>
> On 24/11/2008, at 10:13 PM, SAINTILLAN YVES wrote:
>
>> Dear Mark,
>>
>> Sure: please find attached a modified version of WADL for Yahoo
>> NewsSearch application, that allows to reproduce both issues. In the
>> WADL, the 'GET' method and 'SearchError' fault elements are both
>> defined as children of the application element.
>>
>> Included XSD files, and generated HTML output documentation are also
>> attached.
>>
>> Thanks,
>> Yves
>>
>> -----Original Message-----
>> From: Mark Nottingham [mailto:mnot@...]
>> Sent: samedi 22 novembre 2008 17:51
>> To: SAINTILLAN YVES
>> Cc: public-web-http-desc@...
>> Subject: Re: Issues in WADL stylesheet when referencing faults or
>> methods
>>
>> Could you provide sample input that triggers this?
>>
>> Thanks,
>>
>>
>> On 22/11/2008, at 4:26 AM, SAINTILLAN YVES wrote:
>>
>>> Hello,
>>>
>>> I am using the WADL XSL stylesheet and noticed a couple of issues
>>> when
>>
>>> referencing faults or methods in a WADL:
>>>
>>> - When making a reference (href) to a Fault, defined directly  under
>>> the application element, the fault is not correctly displayed in the
>>> HTML output; in particular, the status of the fault (in the  
>>> reference
>>> or in the definition) does not appear.
>>>
>>> - Similarly, when making reference to a method, defined directly
>>> under
>>
>>> the application element, the name of the method is not displayed in
>>> the HTML documentation.
>>>
>>> So it seems the XSL stylesheet handles well references to
>>> representations, but not faults or methods. Are you aware of these
>>> issues ?
>>>
>>> Thanks and kind regards,
>>> Yves
>>>
>>
>>
>> --
>> Mark Nottingham     http://www.mnot.net/
>>


My Web Application

My Web Application

Resources

Yahoo News Search Service

The Yahoo News Search service provides online searching of news stories from around the world.

Methods

GET

request query parameters
parameter value description

appid

string (required)

The application ID. See Application IDs for more information.

query

string (required)

type

string

One of:

  • all (default)
  • any
  • phrase
all (default)

All query terms.

any

Any query terms.

phrase

Query terms as a phrase.

results

int

Default: 10

start

int

Default: 1

sort

string

One of:

  • rank (default)
  • date

language

string

output

string

One of:

  • xml (default)
  • json
  • php

The format for the output. If json is requested, the results will be returned in JSON format. If php is requested, the results will be returned in Serialized PHP format.

callback

string

The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the Yahoo! Developer Network JSON Documentation.

available response representations:

potential faults:

Representations

A list of news items matching the query (application/xml - yn:ResultSet)

XML Schema

Source: NewsSearchResponse.xsd

<xs:element name="ResultSet">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Result" type="ResultType" minOccurs="0" maxOccurs="50"/>
      </xs:sequence>
      <xs:attribute name="totalResultsAvailable" type="xs:integer"/>
      <xs:attribute name="totalResultsReturned" type="xs:integer"/>
      <xs:attribute name="firstResultPosition" type="xs:integer"/>
    </xs:complexType>
  </xs:element>

Faults

Status Code 400 - application/xml (ya:Error)

XML Schema

Source: NewsSearchError.xsd

<xs:element name="Error">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element name="Message"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>



--
Mark Nottingham     http://www.mnot.net/


YahooSearch.wadl (6K) Download Attachment