Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 12298

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>XSLT Functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="函数参考"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="XSLTProcessor::transformToXML"
HREF="function.xsl-xsltprocessor-transform-to-xml.html"><LINK
REL="NEXT"
TITLE="xslt_backend_info"
HREF="function.xslt-backend-info.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.xsl-xsltprocessor-transform-to-xml.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.xslt-backend-info.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.xslt"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>CLXXXIV. XSLT Functions</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN246550"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xslt.intro"
>简介</A
></H1
><P
>&#13;     This PHP extension provides a processor independent API to XSLT
     transformations. Currently this extension only supports the Sablotron
     library from the Ginger Alliance. Support is planned for other 
     libraries, such as the Xalan library or the libxslt library.
    </P
><P
>&#13;     XSLT (Extensible Stylesheet Language (XSL) Transformations) is a
     language for transforming XML documents into other XML documents.
     It is a standard defined by The World Wide Web Consortium (W3C).
     Information about XSLT and related technologies can be
     found at <A
HREF="http://www.w3.org/TR/xslt"
TARGET="_top"
>http://www.w3.org/TR/xslt</A
>.
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
      This extension is different than the sablotron extension distributed with
      versions of PHP prior to PHP 4.1.0, currently only the new XSLT extension in 
      PHP 4.1.0 is supported. If you need support for the old extension, please ask
      your questions on the PHP mailing lists.
     </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
      本扩展已被移动到 <A
HREF="http://pecl.php.net"
TARGET="_top"
>PECL</A
> 库中且自以下版本起不再被绑定到 PHP 中:5.0.0.
     </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
      If you need xslt support with PHP 5 you can use the
      <A
HREF="ref.xsl.html"
>XSL</A
> extension.
     </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xslt.requirements"
>需求</A
></H1
><P
>&#13;     This extension uses <SPAN
CLASS="productname"
>Sablotron</SPAN
>
     and <SPAN
CLASS="productname"
>expat</SPAN
>, which can both be
     found at <A
HREF="http://www.gingerall.org/sablotron.html"
TARGET="_top"
>http://www.gingerall.org/sablotron.html</A
>. Binaries
     are provided as well as source.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xslt.installation"
>安装</A
></H1
><P
>&#13;  On Unix, run <B
CLASS="command"
>configure</B
> with the
  <CODE
CLASS="option"
>--enable-xslt</CODE
>
  <CODE
CLASS="option"
>--with-xslt-sablot</CODE
>
  options. The <SPAN
CLASS="productname"
>Sablotron</SPAN
>
  library should be installed somewhere your compiler can find it.
 </P
><P
>&#13;  Make sure you have the same libraries linked to the
  <SPAN
CLASS="productname"
>Sablotron</SPAN
> library as those, which are linked
  with PHP. The configuration options:
  <CODE
CLASS="option"
>--with-expat-dir=DIR</CODE
>
  <CODE
CLASS="option"
>--with-iconv-dir=DIR</CODE
>
  are there to help you specify them. When asking for support, always
  mention these directives, and whether there are other versions of those
  libraries installed on your system somewhere. Naturally, provide all the
  version numbers.
 </P
><DIV
CLASS="caution"
><P
></P
><TABLE
CLASS="caution"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>小心</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>&#13;   Be sure your Sablot library is linked to <TT
CLASS="literal"
>-lstdc++</TT
> as
   otherwise your configure will fail, or PHP will fail to run or load.
  </P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>JavaScript E-XSLT support: </B
>
   If you compiled <SPAN
CLASS="productname"
>Sablotron</SPAN
> with JavaScript
   support, you must specify the option:
   <CODE
CLASS="option"
>--with-sablot-js=DIR</CODE
>.
  </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note to Win32 Users: </B
>
  In order for this extension to work, there are
<ACRONYM
CLASS="acronym"
>DLL</ACRONYM
> files that must be available to the Windows
system <TT
CLASS="literal"
>PATH</TT
>. See the <ACRONYM
CLASS="acronym"
>FAQ</ACRONYM
> titled "<A
HREF="faq.installation.html#faq.installation.addtopath"
>How do I add my PHP directory to the PATH
on Windows</A
>" for information on how to do this. Although copying DLL
files from the PHP folder into the Windows system directory also works
(because the system directory is by default in the systems
<TT
CLASS="literal"
>PATH</TT
>), it is not recommended. 
<SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>This extension requires the following files to be in the
<TT
CLASS="literal"
>PATH</TT
>:</I
></SPAN
> 
  <TT
CLASS="filename"
>sablot.dll</TT
>, 
  <TT
CLASS="filename"
>expat.dll</TT
>, and 
  <TT
CLASS="filename"
>iconv.dll</TT
>
  </P
><P
>&#13;   For PHP &#60;= 4.2.0, the file <TT
CLASS="filename"
>iconv.dll</TT
> is 
   not required.
  </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xslt.configuration"
>运行时配置</A
></H1
><P
>本扩展模块在 <TT
CLASS="filename"
>php.ini</TT
> 中未定义任何配置选项。</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xslt.resources"
>资源类型</A
></H1
><P
>&#13;     This extension defines a XSLT processor resource returned by
     <A
HREF="function.xslt-create.html"
><B
CLASS="function"
>xslt_create()</B
></A
>.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xslt.constants"
>预定义常量</A
></H1
><P
>以下常量由本扩展模块定义,因此只有在本扩展模块被编译到
PHP 中,或者在运行时被动态加载后才有效。</P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><TT
CLASS="constant"
><B
>XSLT_OPT_SILENT</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     Drop all logging and error reporting. This is a generic option
     for all backends that may be added in the future.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     Tell <SPAN
CLASS="productname"
>Sablotron</SPAN
> to parse public entities.
     By default this has been turned off.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XSLT_SABOPT_DISABLE_ADDING_META</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     Do not add the meta tag "Content-Type" for HTML output.
     The default is set during compilation of
     <SPAN
CLASS="productname"
>Sablotron</SPAN
>.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XSLT_SABOPT_DISABLE_STRIPPING</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     Suppress the whitespace stripping (on data files only).
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XSLT_SABOPT_IGNORE_DOC_NOT_FOUND</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     Consider unresolved documents (the document() function) non-lethal.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XSLT_SABOPT_FILES_TO_HANDLER</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XSLT_ERR_UNSUPPORTED_SCHEME</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     Error return code, for <A
HREF="function.xslt-set-scheme-handlers.html"
>scheme handlers</A
>.
    </P
></DD
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>目录</B
></DT
><DT
><A
HREF="function.xslt-backend-info.html"
>xslt_backend_info</A
>&nbsp;--&nbsp;
     Returns the information on the compilation settings of the backend
    </DT
><DT
><A
HREF="function.xslt-backend-name.html"
>xslt_backend_name</A
>&nbsp;--&nbsp;
     Returns the name of the backend
    </DT
><DT
><A
HREF="function.xslt-backend-version.html"
>xslt_backend_version</A
>&nbsp;--&nbsp;
     Returns the version number of Sablotron
    </DT
><DT
><A
HREF="function.xslt-create.html"
>xslt_create</A
>&nbsp;--&nbsp;Create a new XSLT processor</DT
><DT
><A
HREF="function.xslt-errno.html"
>xslt_errno</A
>&nbsp;--&nbsp;Returns an error number</DT
><DT
><A
HREF="function.xslt-error.html"
>xslt_error</A
>&nbsp;--&nbsp;Returns an error string</DT
><DT
><A
HREF="function.xslt-free.html"
>xslt_free</A
>&nbsp;--&nbsp;Free XSLT processor</DT
><DT
><A
HREF="function.xslt-getopt.html"
>xslt_getopt</A
>&nbsp;--&nbsp;
     Get options on a given xsl processor
    </DT
><DT
><A
HREF="function.xslt-process.html"
>xslt_process</A
>&nbsp;--&nbsp;Perform an XSLT transformation</DT
><DT
><A
HREF="function.xslt-set-base.html"
>xslt_set_base</A
>&nbsp;--&nbsp;Set the base URI for all XSLT transformations</DT
><DT
><A
HREF="function.xslt-set-encoding.html"
>xslt_set_encoding</A
>&nbsp;--&nbsp;Set the encoding for the parsing of XML documents</DT
><DT
><A
HREF="function.xslt-set-error-handler.html"
>xslt_set_error_handler</A
>&nbsp;--&nbsp;Set an error handler for a XSLT processor</DT
><DT
><A
HREF="function.xslt-set-log.html"
>xslt_set_log</A
>&nbsp;--&nbsp;Set the log file to write log messages to</DT
><DT
><A
HREF="function.xslt-set-object.html"
>xslt_set_object</A
>&nbsp;--&nbsp;
     Sets the object in which to resolve callback functions
    </DT
><DT
><A
HREF="function.xslt-set-sax-handler.html"
>xslt_set_sax_handler</A
>&nbsp;--&nbsp;Set SAX handlers for a XSLT processor</DT
><DT
><A
HREF="function.xslt-set-sax-handlers.html"
>xslt_set_sax_handlers</A
>&nbsp;--&nbsp;
     Set the SAX handlers to be called when the XML document gets processed
    </DT
><DT
><A
HREF="function.xslt-set-scheme-handler.html"
>xslt_set_scheme_handler</A
>&nbsp;--&nbsp;Set Scheme handlers for a XSLT processor</DT
><DT
><A
HREF="function.xslt-set-scheme-handlers.html"
>xslt_set_scheme_handlers</A
>&nbsp;--&nbsp;
     Set the scheme handlers for the XSLT processor
    </DT
><DT
><A
HREF="function.xslt-setopt.html"
>xslt_setopt</A
>&nbsp;--&nbsp;
     Set options on a given xsl processor
    </DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.xsl-xsltprocessor-transform-to-xml.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.xslt-backend-info.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>XSLTProcessor::transformToXML</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>xslt_backend_info</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>