Value
From Hypertopic
Contents |
Document Format of Attribute Value
Attribute Value DTD
<?xml version="1.0" encoding="UTF-8"?> <!ELEMENT value (attribute, entity*)> <!ELEMENT attribute EMPTY> <!ELEMENT entity EMPTY> <!ATTLIST value href CDATA #IMPLIED value CDATA #REQUIRED > <!ATTLIST attribute href CDATA #REQUIRED name CDATA #IMPLIED > <!ATTLIST entity href CDATA #REQUIRED >
Example of Attribute Value
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE value SYSTEM "http://tech-ada.utt.fr/validator/dtd/value.dtd"> <value value="SOFTWARE"> <attribute href="http://tech-ada.utt.fr/attribute/license/" name="license" /> <entity href="http://tech-ada.utt.fr/entity/JIGSAW/" /> <entity href="http://tech-ada.utt.fr/entity/AMAYA/" /> </value>
XML structure of Attribute Value
| XPath | Cardinality | Description |
| /value/@value | Required | Attribute URI. |
| /value/attribute | * | The attribute which this value belongs to. |
| /value/attribute/@href | Optional | Attribute URI. |
| /value/attribute/@name | Required | Attribute Name. |
| /value/entity | * | Entities described by the attribute value. |
| /value/entity/@href | Required | Entity URI. |
Get an Attribute Value
Get an attribute value.
Arguments
attributename (Required)
- The name of attribute which the value belongs to
attributevalue (Required)
- The value of attribute, the attribute value should be encode with RFC1738 encode.
Note: This method requires an HTTP GET request.
Example Request
GET /attribute/license/W3C+software+notice+and+license/
Example Response
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE value SYSTEM "http://tech-ada.utt.fr/validator/dtd/value.dtd"> <value href="http://tech-ada.utt.fr/attribute/license/W3C+software+notice+and+license/" value="W3C software notice and license"> <attribute href="http://tech-ada.utt.fr/attribute/license/">license</attribute> <entity href="http://tech-ada.utt.fr/entity/JIGSAW" /> </value>
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.
Query Attribute Values
Get attribute values by SQL like clause.
Arguments
attributename (Required)
- The name of attribute which the value belongs to
Note: This method requires an HTTP GET request.
Example Request
For example, if you want to find the attribute which name is license and has value (W3C software notice and license). The SQL clause is attributevalue='W3C software notice and license'. In Hypertopic protocol you can also use SQL like clause to search attribute. To do this use following request.
GET /attribute/license/set/attributevalue%3D%27W3C%20software%20notice%20and%20license%27/
Note: You should convert all non-alphanumeric characters except '-_.' with a percent (%) sign followed by two hex digits. See RFC 1738[1]
Example Response
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE value SYSTEM "http://tech-ada.utt.fr/validator/dtd/value.dtd"> <value clause="attributevalue='W3C software notice and license'"> <attribute href="http://tech-ada.utt.fr/attribute/license/">license</attribute> <entity href="http://tech-ada.utt.fr/entity/JIGSAW/" /> </value>
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.
