Sophie

Sophie

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

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_setopt</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="XSLT Functions"
HREF="ref.xslt.html"><LINK
REL="PREVIOUS"
TITLE="xslt_set_scheme_handlers"
HREF="function.xslt-set-scheme-handlers.html"><LINK
REL="NEXT"
TITLE="YAZ Functions"
HREF="ref.yaz.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
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.xslt-set-scheme-handlers.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="ref.yaz.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.xslt-setopt"
></A
>xslt_setopt</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN247248"
></A
><P
>    (PHP 4 &#62;= 4.3.0, PECL)</P
>xslt_setopt&nbsp;--&nbsp;
     Set options on a given xsl processor
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247251"
></A
><H2
>Description</H2
>mixed <B
CLASS="methodname"
>xslt_setopt</B
> ( resource processor, int newmask )<BR
></BR
><P
>&#13;     <B
CLASS="function"
>xslt_setopt()</B
> sets the options specified by 
     <CODE
CLASS="parameter"
>newmask</CODE
> on the given <CODE
CLASS="parameter"
>processor</CODE
>.
     Returns the number of previous mask is possible, <TT
CLASS="constant"
><B
>TRUE</B
></TT
> otherwise,
     <TT
CLASS="constant"
><B
>FALSE</B
></TT
> in case of an error.
    </P
><P
>&#13;     <CODE
CLASS="parameter"
>newmask</CODE
> is a bitmask constructed with the following
     constants: 
     <P
></P
><UL
><LI
><P
>&#13;        <TT
CLASS="constant"
><B
>XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</B
></TT
> - Tell the processor
        to parse public entities. By default this has been turned off.
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="constant"
><B
>XSLT_SABOPT_DISABLE_ADDING_META</B
></TT
> - Do not add the meta
        tag "Content-Type" for HTML output. The default is set during the compilation
        of the processor.
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="constant"
><B
>XSLT_SABOPT_DISABLE_STRIPPING</B
></TT
> - Suppress the whitespace
        stripping (on data files only). 
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="constant"
><B
>XSLT_SABOPT_IGNORE_DOC_NOT_FOUND</B
></TT
> - Consider unresolved
        documents (the document() function) non-lethal. 
       </P
></LI
></UL
>
    </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247283"
></A
><H2
>范例</H2
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN247285"
></A
><P
><B
>例 1. <B
CLASS="function"
>xslt_setopt()</B
> Example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />$xh </font><font color="#007700">= </font><font color="#0000BB">xslt_create</font><font color="#007700">();<br /><br /></font><font color="#FF8000">// Tell Sablotron to process public entities<br /></font><font color="#0000BB">xslt_setopt</font><font color="#007700">(</font><font color="#0000BB">$xh</font><font color="#007700">, </font><font color="#0000BB">XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</font><font color="#007700">);<br /><br /></font><font color="#FF8000">// Let's also ask him to suppress whitespace stripping<br /></font><font color="#0000BB">xslt_setopt</font><font color="#007700">(</font><font color="#0000BB">$xh</font><font color="#007700">, </font><font color="#0000BB">xslt_getopt</font><font color="#007700">(</font><font color="#0000BB">$xh</font><font color="#007700">) | </font><font color="#0000BB">XSLT_SABOPT_DISABLE_STRIPPING</font><font color="#007700">);<br /><br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247289"
></A
><H2
>参见</H2
><P
>&#13;     <A
HREF="function.xslt-getopt.html"
><B
CLASS="function"
>xslt_getopt()</B
></A
>.
    </P
></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.xslt-set-scheme-handlers.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="ref.yaz.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>xslt_set_scheme_handlers</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.xslt.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>YAZ Functions</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>