Top

Name

xml_view_schema — returns an XML schema for the output of given XML VIEW

Synopsis

varchar xml_view_schema ( in query varchar ,
  in root_element varchar );
 

Description

This function return an XML schema for the output of given XML VIEW. The returned schema will be valid if the HTTP_... output of view wrapped into the specified root element.

Parameters

query

a string which contains a name of XML view

root_element

a string containing the element name in which the XML schema would be wrapped

Return Types

XML Schema

Errors

Table 24.132. Errors signalled by

SQLState Error Code Error Text Description
42000 No XML view [view_name]  

Examples

Example 24.524. Creating an XML Schema


SQL> select xml_view_schema ('cat', 'root');
callret
VARCHAR
_______________________________________________________________________________

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

 <xsd:annotation>
  <xsd:documentation>
    Schema of XML view 'cat'
  </xsd:documentation>
 </xsd:annotation>

 <xsd:element name="root" type="root__Type"/>

 <xsd:complexType name="root__Type">
  <xsd:element name="category" type="root_category_Type" minOccurs="0" maxOccurs="unbounded"/>
 </xsd:complexType>

 <xsd:complexType name="root_category_Type">
  <xsd:attribute name="CategoryID" type="xsd:string"/>

<!-- <xsd:attribute name="CategoryID" type="xsd:int"/> -->

  <xsd:attribute name="description" type="xsd:string"/>
  <xsd:element name="product" type="category_product_Type" minOccurs="0" maxOccurs="unbounded"/>
 </xsd:complexType>

 <xsd:complexType name="category_product_Type">
  <xsd:attribute name="ProductName" type="xsd:string"/>
 </xsd:complexType>
</xsd:schema>

1 Rows. -- 9 msec.