php-doc-en/reference/dom/domdocument/schemavalidate.xml
2020-10-23 13:01:50 +00:00

106 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="domdocument.schemavalidate" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>DOMDocument::schemaValidate</refname>
<refpurpose>
Validates a document based on a schema. Only XML Schema 1.0 is supported.
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>DOMDocument::schemaValidate</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Validates a document based on the given schema file.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
The path to the schema.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
A bitmask of Libxml schema validation flags. Currently the only supported value is <link
linkend="libxml.constants">LIBXML_SCHEMA_CREATE</link>. Available since PHP 5.5.2 and Libxml 2.6.14.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.5.2</entry>
<entry>
Added the <parameter>flags</parameter> parameter
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>DOMDocument::schemaValidateSource</methodname></member>
<member><methodname>DOMDocument::relaxNGValidate</methodname></member>
<member><methodname>DOMDocument::relaxNGValidateSource</methodname></member>
<member><methodname>DOMDocument::validate</methodname></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->