GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MathML::Entities(3) User Contributed Perl Documentation MathML::Entities(3)

MathML::Entities - Convert XHTML+MathML Named Entities to Numeric Character References

 use MathML::Entities;
 
 $html    = '<b>&copy;</b> by me';
 
 # convert named HTML entities to character references:
 $numeric = name2numbered($html);    # <b>&#x000A9;</b> by me

 # convert named HTML entities to character references:
 $utf8 = name2utf8($html);    # utf8

MathML::Entities a content conversion filter for named XHTML+MathML entities. There are over two thousand named entities in the XHTML+MathML DTD. All the Entities defined in the XHTML+MathML DTD except the five "safe" ones ("&lt;", "&gt;", "&amp;", "&quot;", "&apos;"), will be converted to the equivalent numeric character references or to utf-8 characters. Named entities which are not in the XHTML+MathML DTD are escaped. This makes the resulting XHTML (or XHTML+MathML) safe for consumption by non-validating XML parsers.

Unlike, HTML::Entities, the mapping between MathML named entities and codepoints is many-to-one. Therefore, there's no particular sense in having an inverse function, which takes codepoints to named entities.

Based on: HTML::Entities by Koichi Taniguchi <taniguchi@livedoor.jp>

The following functions are exported by default.
  • name2numbered

    XHTML+MathML named entities (except for the five "safe" XML named entities) in the argument of "name2numbered()" are replaced by the corresponding numbered character references.

  • name2utf8

    XHTML+MathML named entities (except for the five "safe" XML named entities) in the argument of "name2utf8()" are replaced by the corresponding utf-8 characters.

Jacques Distler <distler@golem.ph.utexas.edu>

Copyright (c) 2005 Jacques Distler. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

HTML::Entities, HTML::Entities::Numbered, <http://www.w3.org/TR/REC-html40/sgml/entities.html>, <http://www.w3.org/Math/characters/>

Hey! The above document had some coding errors, which are explained below:
Around line 2245:
You forgot a '=back' before '=head1'
2009-11-18 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.