The format of a generated XML schema for columnstyle=attribute is similar to the XML schema for columnstyle=element. The only difference is that the columns are specified as XML attributes of the rowtype declaration. For example:
select forxmlschemaj("select 1,2", "columnstyle=attribute") ----------------------- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sqlxml="http://www.iso-standards.org/mra/9075/sqlx"> <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.iso-standards.org/mra/9075/sqlx.xsd" /> <xsd:complexType name="RowType.resultset"> <xsd:attribute name="C1" type="INTEGER" use="required"/> <xsd:attribute name="C2" type="INTEGER" use="required"/> </xsd:complexType> <xsd:complexType name="TableType.resultset"> <xsd:sequence> <xsd:element name="row" type="RowType.resultset" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:simpleType name="INTEGER"> <xsd:restriction base="xsd:integer"> <xsd:maxInclusive value="2147483647"/> <xsd:minInclusive value="-2147483648"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="resultset" type="TableType.resultset"/> </xsd:schema>
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |