Below is the general form of the template, showing the methods for specifying SQL queries and XPath queries: Below is the general form of the template, showing the methods for specifying SQL queries and XPath queries:
..
..
...n
sql statement(s)
XPath query
Any element in the template is optional. Element
, , , And feature ING architecture are defined in the SQL namespace. Therefore, you must declare xmlns: SQL = "urn: schemas-microsoft-com: xml-SQL" in the namespace ". Any namespace can be named. SQL is just an alias.
Specify this tag to provide a single top-level element (also known as the root tag) of the obtained XML document ). The tag can be any name.
This tag is used to save all title values. In the current implementation scheme, you can only specify Element. Used as a Include tag to allow you to define multiple parameters. All parameter definitions are in one location, which makes processing parameter definitions more effective.
This element is used to define the parameters passed to the query in the template. EachThe element defines a parameter. You can Multiple tags are defined in the tag. Element.
This element is used to specify an SQL query. You can specify multiple Element.
This element is used to specify the XPath query. Because XPath queries are executed in the simplified XML data (XDR) architecture with annotations, you must use the mapping-schema feature to specify the schema file name.
SQL: xsl
This feature is used to specify the extensible style sheet language (XSL) style sheet that will be applied to the obtained XML document. When specifying a ing schema file, you can specify a relative or absolute path. The specified relative path is the directory associated with the virtual name of the template type. For example, if the directory associated with the virtual name of the template type is C: \ Template, the relative path Xyz/MyXSL specified by SQL: xsl is used. xml maps to C: \ Template \ Xyz \ MyXSL. xml.
Mapping-schema
This feature is used to identify the annotated XDR architecture. This feature is specified only when an XPath query is executed in the template. The XPath query is executed in the annotated XDR architecture. When specifying a ing schema file, you can specify a relative or absolute path. The specified relative path is the directory associated with the virtual name of the template type. For example, if the directory associated with the virtual name of the template type is C: \ Template, the relative path is (schema/MSchema specified by mapping-schema. xml) ING to C: \ Template \ Schema \ MSchema. xml.
Description Or Indicates a separate transaction. Therefore, if there are multiple Or Tag. when a tag fails, other tags will continue.
If contenttype is set, Sqlisapi. dll returns the title information to the browser. If contenttype is not set, urlmon uses the first character in the template file to determine the content type. If the first character in the template is a <character or Unicode byte sequence sign (0 xFFFE), text/xml is returned to the browser as the content type and the browser displays the result. Otherwise, Sqlisapi. dll does not send the content type title information that guides the browser to display the result. Therefore, the result is not displayed in the browser.
Before specifying a template in a URL template, you must use the IIS virtual directory management utility for SQL Server to create a virtual name of the template type. For more information, see use the IIS virtual directory management utility for SQL Server.
Storage Template
The template is stored in the directory associated with the virtual name of the template type or a sub-directory of the template type:
If the template is stored in the directory associated with the virtual name of the template type, the URL query format is as follows:
http://IISServer/nwind/TemplateVirtualName/TemplateFile.xml
If the template is stored in a subdirectory associated with the virtual name of the template type (xyz), the URL query format is as follows:
http://IISServer/nwind/TemplateVirtualName/xyz/TemplateFile.xml
Namespaces are not supported for XPath queries directly specified in URLs. If you want to use a namespace in an XPath query, you should use the template
The above is the content of using the XML template (MSSQL manual). For more information, see PHP Chinese website (www.php1.cn )!