Don't get it wrong. It is not described in the international standard mathematical xml, which is implemented through the support of the latest browser. I just tried to use xml + xslt and simple html for display. It's just a preliminary idea to share with you. Maybe a lot of people have made similar attempts before. It doesn't matter. I just want to talk about my thoughts.
The format of mathematical formulas is diverse, such as limit and points. Each part can be displayed in html and combined in table. My idea is to use xml to describe the relationship between different parts of the mathematical formula, and then use xslt to format the xml file.
A simple example is the square of x. Use such xml data to describe. Note that this is not an international standard format. The real implementation should be more formal.
<Power>
<Base>
<Quote Val = "X"/>
</Base>
<Exponent>
<Quote Val = "2"/>
</Exponent>
</Power>
The <Quote> indicates that the values of the val attribute can be copied directly without formatting. Then, such an xslt is used for conversion:
<? Xml version = "1.0"?>
<Xsl: stylesheet xmlns: xsl = "http://www.w3.org/TR/WD-xsl">
<Xsl: template match = "/">
<Html>
<Body>
<Xsl: apply-templates select = "Power"/>
</Body>
</Html>
</Xsl: template>
<Xsl: template match = "Power">
<Table cellpadding = "0" cellspacing = "0">
<Tr>
<Td>
<Table cellpadding = "0" cellspacing = "0">
<Tr>
<Td>
</Td>
</Tr>
<Tr>
<Td>
<Xsl: apply-templates select = "base"/>
</Td>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.