man-pages/man3/XML::XPathEngine::Literal.3pm.html
2021-03-31 01:06:50 +01:00

95 lines
2.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of XML::XPathEngine::Literal</TITLE>
</HEAD><BODY>
<H1>XML::XPathEngine::Literal</H1>
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2018-01-01<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
XML::XPathEngine::Literal - Simple string values.
<A NAME="lbAC">&nbsp;</A>
<H2>DESCRIPTION</H2>
In XPath terms a Literal is what we know as a string.
<A NAME="lbAD">&nbsp;</A>
<H2>API</H2>
<A NAME="lbAE">&nbsp;</A>
<H3>new($string)</H3>
Create a new Literal object with the value in <TT>$string</TT>. Note that &amp;quot; and
&amp;apos; will be converted to &quot; and ' respectively. That is not part of the XPath
specification, but I consider it useful. Note though that you have to go
to extraordinary lengths in an <FONT SIZE="-1">XML</FONT> template file (be it <FONT SIZE="-1">XSLT</FONT> or whatever) to
make use of this:
<P>
<PRE>
&lt;xsl:value-of select=&quot;&amp;quot;I'm feeling &amp;amp;quot;sad&amp;amp;quot;&amp;quot;&quot;/&gt;
</PRE>
<P>
Which produces a Literal of:
<P>
<PRE>
I'm feeling &quot;sad&quot;
</PRE>
<A NAME="lbAF">&nbsp;</A>
<H3><I>value()</I></H3>
Also overloaded as stringification, simply returns the literal string value.
<A NAME="lbAG">&nbsp;</A>
<H3>cmp($literal)</H3>
Returns the equivalent of perl's cmp operator against the given <TT>$literal</TT>.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">DESCRIPTION</A><DD>
<DT id="3"><A HREF="#lbAD">API</A><DD>
<DL>
<DT id="4"><A HREF="#lbAE">new($string)</A><DD>
<DT id="5"><A HREF="#lbAF"><I>value()</I></A><DD>
<DT id="6"><A HREF="#lbAG">cmp($literal)</A><DD>
</DL>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:01 GMT, March 31, 2021
</BODY>
</HTML>