-
-
18 Nov 2009 17:56:42 UTC
- Distribution: MathML-Entities
- Module version: 0.17
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (592 / 0 / 0)
- Kwalitee
Bus factor: 1- 93.33% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (51.98KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
MathML::Entities - Convert XHTML+MathML Named Entities to Numeric Character References
SYNOPSIS
use MathML::Entities; $html = '<b>©</b> by me'; # convert named HTML entities to character references: $numeric = name2numbered($html); # <b>©</b> by me # convert named HTML entities to character references: $utf8 = name2utf8($html); # utf8
DESCRIPTION
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 (
<
,>
,&
,"
,'
), 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>
FUNCTIONS
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.
AUTHOR
Jacques Distler <distler@golem.ph.utexas.edu>
COPYRIGHT
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.
SEE ALSO
HTML::Entities, HTML::Entities::Numbered, http://www.w3.org/TR/REC-html40/sgml/entities.html, http://www.w3.org/Math/characters/
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 2245:
You forgot a '=back' before '=head1'
Module Install Instructions
To install MathML::Entities, copy and paste the appropriate command in to your terminal.
cpanm MathML::Entities
perl -MCPAN -e shell install MathML::Entities
For more information on module installation, please visit the detailed CPAN module installation guide.