Attribute

From Hypertopic

Jump to: navigation, search

Contents

Document Format of Attribute

Attribute List DTD

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT attributes (attribute*)>
<!ELEMENT attribute (#PCDATA)>
<!ATTLIST attribute
    href CDATA #IMPLIED
>

Example of Attribute List

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attributes SYSTEM "http://tech-ada.utt.fr/validator/dtd/attributes.dtd">
<attributes>
  <attribute href="http://tech-ada.utt.fr/attribute/name/">name</attribute>
  <attribute href="http://tech-ada.utt.fr/attribute/type/">type</attribute>
  <attribute href="http://tech-ada.utt.fr/attribute/license/">license</attribute>
  <attribute href="http://tech-ada.utt.fr/attribute/program+language/">program language</attribute>
  <attribute href="http://tech-ada.utt.fr/attribute/last+release/">last release</attribute>
  <attribute href="http://tech-ada.utt.fr/attribute/project+site/">project site</attribute>
  <attribute href="http://tech-ada.utt.fr/attribute/demo+site/">demo site</attribute>
</attributes>

Attribute DTD

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT attribute (value*)>
<!ELEMENT value EMPTY>
<!ATTLIST attribute
    href CDATA #IMPLIED
    name CDATA #IMPLIED
>
<!ATTLIST value
    href CDATA #IMPLIED
    value CDATA #REQUIRED
>

Example of Attribute

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attribute SYSTEM "http://tech-ada.utt.fr/validator/dtd/attribute.dtd">
<attribute href="http://tech-ada.utt.fr/attribute/license/" name="license">
  <value href="http://tech-ada.utt.fr/attribute/license/GPL+License/" value="GPL License" />
  <value href="http://tech-ada.utt.fr/attribute/license/W3C+Software+Notice+and+License/" value="W3C Software Notice and License" />
</attribute>

XML structure of Attribute

XPath Cardinality Description
/attribute/@href Optional Attribute URI.
/attribute/@name Optional The Name of the attribute.
/attribute/value * Attribute values.
/attribute/value/@href Optional Attribute Value URI
/attribute/value/@value Required Attribute Value

Get a List of Attribute

get all attributes.

Arguments

Note: This method requires an HTTP GET request.

Example Request

GET /attribute/

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attributes SYSTEM "http://tech-ada.utt.fr/validator/dtd/attributes.dtd">
<attributes>
    <attribute href="http://tech-ada.utt.fr/attribute/name/">name</attribute>
    <attribute href="http://tech-ada.utt.fr/attribute/type/">type</attribute>
    <attribute href="http://tech-ada.utt.fr/attribute/license/">license</attribute>
    <attribute href="http://tech-ada.utt.fr/attribute/program+language/">program language</attribute>
    <attribute href="http://tech-ada.utt.fr/attribute/last+release/">last release</attribute>
    <attribute href="http://tech-ada.utt.fr/attribute/project+site/">project site</attribute>
    <attribute href="http://tech-ada.utt.fr/attribute/demo+site/">demo site</attribute>
</attributes>

Status Codes

200: OK

The request has succeeded.

500: Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

503: Service currently unavailable

The requested service is temporarily unavailable.

Get an Attribute

get a specific attribute information with attribute values.

Arguments

attributename (Required)

The name of attribute you want to get.

Note: This method requires an HTTP GET request.

Example Request

GET /attribute/license/

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attribute SYSTEM "http://tech-ada.utt.fr/validator/dtd/attribute.dtd">
<attribute href="http://tech-ada.utt.fr/attribute/license/" name="license">
    <value href="http://tech-ada.utt.fr/attribute/license/GPL+License/" value="GPL License" />
    <value href="http://tech-ada.utt.fr/attribute/license/W3C+Software+Notice+and+License/" value="W3C Software Notice and License" />
</attribute>

Status Codes

200: OK

The request has succeeded.

404: Not Found

The server has not found anything matching the Request-URI.

500: Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

503: Service currently unavailable

The requested service is temporarily unavailable.
Personal tools