[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SGML complexity

  • From: <juanrgonzaleza@c...>
  • To: <xml-dev@l...>
  • Date: Fri, 8 Sep 2006 07:30:09 -0700 (PDT)

Re:  SGML complexity
Philippe Poulard said:
> juanrgonzaleza@c... wrote:
>>
>> transforming this
>>
>> <math code="LaTeX">x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}</math>
>>
>> to this
>>
>> <math>
>>   <mi>x</mi>
>>   <mo>=</mo>
>>   <mfrac>
>>     <mrow>
>>       <mrow>
>>         <mo>-</mo>
>>         <mi>b</mi>
>>       </mrow>
>>       <mo>&PlusMinus;</mo>
>>       <msqrt>
>>         <msup>
>>           <mi>b</mi>
>>           <mn>2</mn>
>>         </msup>
>>         <mo>-</mo>
>>         <mrow>
>>           <mn>4</mn>
>>           <mo>&InvisibleTimes;</mo>
>>           <mi>a</mi>
>>           <mo>&InvisibleTimes;</mo>
>>           <mi>c</mi>
>>         </mrow>
>>       </msqrt>
>>     </mrow>
>>     <mrow>
>>       <mn>2</mn>
>>       <mo>&InvisibleTimes;</mo>
>>       <mi>a</mi>
>>     </mrow>
>>   </mfrac>
>> </math>
>>
>> can be a nightmare in XSLT 1 (specially when compared with JS-DOM or
>> PHP methods). I do not know of XSLT 2 new capabilities but Mike here
>> could say us something.
>>
>
> If I had such a transformation to perform, I would simply do it like
> this : <xsl:template match="math[code='LaTeX'"]>
>      <xsl:value-of select="lib:latex2mathml( . )"/>
> <xsl:template>
> or even if you don't know how to bind a function library to your XSLT
> processor :
> <xsl:template match="math[code='LaTeX'"]>
>      <xsl:value-of select="document( concat(
> 'http://my.rest.service/latex/2/mathml?code=', . ) )"/>
> <xsl:template>

And sure i can also reference a .js from the XSLT and final doc is
transformed to mathml ouput on the fly.

And sure also i could do full match pattern transforming predefined
equations and store several billions of predefined patterns in an external
file.

And sure...

But difficult to believe i was using XSLT for the transformation.

> Nobody said that XSLT must be standalone, and I'm sure it's easy to find
>  a converter for LaTeX.

Please point some doing _exactly_ the transformation i wrote.

> As you combined some XML tags with LaTeX, why not using both tools and
> make a smart bridge between them ?

Combination of XML with LaTeX is common practice since MathML is too
verbose. Several MathML tools work in that way. Combination of c-MathML
with TeX is also defined in the MathML spec.

What you mean by "make a smart bridge between them"

> --
> Cordialement,
>
>                ///
>               (. .)
>   --------ooO--(_)--Ooo--------
> |      Philippe Poulard       |
>   -----------------------------
>   http://reflex.gforge.inria.fr/
>         Have the RefleX !


Juan R.

Center for CANONICAL |SCIENCE)




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.