|
List Info
Thread: MathML and
|
|
| MathML and
<fo:instream-foreign-object> |

|
2007-03-30 02:16:12 |
Hey,
In order to get MathML rendered with Antenna House's
XSLFormatter, you
need to wrap all MathML blocks inside a
<fo:instream-foreign-object>
element. If I (very naively) do
<xsl:template match="mml "
xmlns:mml="http://w
ww.w3.org/1998/Math/MathML">
<fo:instream-foreign-object>
<xsl:copy>
<xsl:copy-of select=" *"/>
<xsl:apply-templates/>
</xsl:copy>
</fo:instream-foreign-object>
</xsl:template>
I get something like this in the FO file
<fo:instream-foreign-object xmlns:mml="http://www.w3.org/1998/
Math/M
athML"><fo:instream-foreign-object><mml:mat
h overflow="scroll">
<fo:instream-foreign-object><mml:mrow>
<fo:instream-foreign-object><mml:msup>
etc. All I wanted was to have the outer most MathML wrapped
in the
<fo:instream-foreign-object> element. This naturely
puts my inane
XSL capabilities on display, but I would still be very happy
if somebody
could point me at a solution.
Cuurently, I use a sed command for solving the issue, but
would prefer
somthing that could go inside my cust. layer.
All the best (and happy Easter),
Mads
+---------------------------------+-------------------------
+
| Mads Ipsen |
|
| Dept. of Chemistry | phone: +45-35320220
|
| H.C.Ørsted Institute | fax: +45-35320322
|
| Universitetsparken 5 |
|
| DK-2100 Copenhagen Ø, Denmark | mpi osc.kiku.dk |
+---------------------------------+-------------------------
+
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 02:42:48 |
Mads Ipsen wrote:
> In order to get MathML rendered with Antenna House's
XSLFormatter, you
> need to wrap all MathML blocks inside a
<fo:instream-foreign-object>
> element. If I (very naively) do
Get the latest snapshot from http://docbook.sf.ne
t/snapshots/
I have fixed exactly this week or two ago.
--
------------------------------------------------------------
------
Jirka Kosek e-mail: jirka kosek.cz http://xmlguru.cz
------------------------------------------------------------
------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34
member
------------------------------------------------------------
------
Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.
html
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 03:45:05 |
Did you fix this:
http://so
urceforge.net/tracker/index.php?func=detail&aid=1574016&
amp;group_id=21935&atid=373749
[ 1574016 ] docbook 5 imagedata svg and mml support
?
Also, in the namespaced version of the xsl 1 stylesheets, is
it now
possible to create a version that doesn't require MathML
elements to
have a prefix?
On 3/30/07, Jirka Kosek <jirka kosek.cz> wrote:
> Mads Ipsen wrote:
>
> > In order to get MathML rendered with Antenna
House's XSLFormatter, you
> > need to wrap all MathML blocks inside a
<fo:instream-foreign-object>
> > element. If I (very naively) do
>
> Get the latest snapshot from http://docbook.sf.ne
t/snapshots/
> I have fixed exactly this week or two ago.
>
> --
>
------------------------------------------------------------
------
> Jirka Kosek e-mail: jirka kosek.cz http://xmlguru.cz
>
------------------------------------------------------------
------
> Professional XML consulting and training
services
> DocBook customization, custom XSLT/XSL-FO document
processing
>
------------------------------------------------------------
------
> OASIS DocBook TC member, W3C Invited Expert,
ISO/JTC1/SC34 member
>
------------------------------------------------------------
------
> Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.
html
>
>
>
--
http://chris.chiasson.nam
e/
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 04:25:49 |
Chris Chiasson wrote:
> Did you fix this:
>
> http://so
urceforge.net/tracker/index.php?func=detail&aid=1574016&
amp;group_id=21935&atid=373749
>
>
> [ 1574016 ] docbook 5 imagedata svg and mml support
>
> ?
No, I will look into this issue later, hopefully during the
weekend.
> Also, in the namespaced version of the xsl 1
stylesheets, is it now
> possible to create a version that doesn't require
MathML elements to
> have a prefix?
XSLT is not prefix aware, so you can use any prefix for your
MathML
elements, including using no prefix and relying on default
namespace, like:
<article>
<title>MathML test</title>
<para>Fraction <inlineequation><math
xmlns="http://w
ww.w3.org/1998/Math/MathML"><mfrac><mn>1
</mn><mi>n</mi></mfrac></math>
</inlineequation></para>
</article>
--
------------------------------------------------------------
------
Jirka Kosek e-mail: jirka kosek.cz http://xmlguru.cz
------------------------------------------------------------
------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34
member
------------------------------------------------------------
------
Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.
html
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 04:31:28 |
On 3/30/07, Jirka Kosek <jirka kosek.cz> wrote:
> > Also, in the namespaced version of the xsl 1
stylesheets, is it now
> > possible to create a version that doesn't require
MathML elements to
> > have a prefix?
>
> XSLT is not prefix aware, so you can use any prefix for
your MathML
> elements, including using no prefix and relying on
default namespace, like:
>
> <article>
> <title>MathML test</title>
>
> <para>Fraction <inlineequation><math
> xmlns="http://w
ww.w3.org/1998/Math/MathML"><mfrac><mn>1
</mn><mi>n</mi></mfrac></math>
</inlineequation></para>
> </article>
>
Does this work with the current stylesheets, or is it still
looking
for elements with the mml: (or svg: ) prefix? I think the
reason the
old stylesheets needed the prefixes was that they did not
use
namespaces. Is that true?
--
http://chris.chiasson.nam
e/
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 04:34:37 |
Chris Chiasson wrote:
> Does this work with the current stylesheets,
Yes, but at this time you have to download snapshot
release.
> or is it still looking
> for elements with the mml: (or svg: ) prefix? I think
the reason the
> old stylesheets needed the prefixes was that they did
not use
> namespaces. Is that true?
No, stylesheet can use completely different prefixes then
instance.
Matching is done on namespace name (URI). I'm probably
misunderstanding
your problem here.
--
------------------------------------------------------------
------
Jirka Kosek e-mail: jirka kosek.cz http://xmlguru.cz
------------------------------------------------------------
------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34
member
------------------------------------------------------------
------
Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.
html
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 04:56:37 |
On 3/30/07, Jirka Kosek <jirka kosek.cz> wrote:
> Chris Chiasson wrote:
>
> > Does this work with the current stylesheets,
>
> Yes, but at this time you have to download snapshot
release.
>
> > or is it still looking
> > for elements with the mml: (or svg: ) prefix? I
think the reason the
> > old stylesheets needed the prefixes was that they
did not use
> > namespaces. Is that true?
>
> No, stylesheet can use completely different prefixes
then instance.
> Matching is done on namespace name (URI). I'm probably
misunderstanding
> your problem here.
In html/math.xsl, there were some lines like this:
<!-- "Support" for MathML -->
<xsl:template match="mml "
xmlns:mml="http://w
ww.w3.org/1998/Math/MathML">
<xsl:copy>
<xsl:copy-of select=" *"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
As far as I know, this means that MathML was only passed
through if it
had an mml: prefix. I assume this was done because of the
non-namespaced template matching. So, is that a correct
assessment? Is
the requirement for the prefix still present?
--
http://chris.chiasson.nam
e/
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 12:16:35 |
----- Original Message -----
From: "Chris Chiasson" <chris chiasson.name>
To: "Jirka Kosek" <jirka kosek.cz>
Cc: "Mads Ipsen" <mpi osc.kiku.dk>;
<docbook-apps lists.oasis-open.org>
Sent: Friday, March 30, 2007 1:56 AM
Subject: Re: [docbook-apps] MathML and
<fo:instream-foreign-object>
> On 3/30/07, Jirka Kosek <jirka kosek.cz> wrote:
>> Chris Chiasson wrote:
>>
>> > Does this work with the current stylesheets,
>>
>> Yes, but at this time you have to download snapshot
release.
>>
>> > or is it still looking
>> > for elements with the mml: (or svg: ) prefix?
I think the reason the
>> > old stylesheets needed the prefixes was that
they did not use
>> > namespaces. Is that true?
>>
>> No, stylesheet can use completely different
prefixes then instance.
>> Matching is done on namespace name (URI). I'm
probably misunderstanding
>> your problem here.
>
> In html/math.xsl, there were some lines like this:
>
> <!-- "Support" for MathML -->
>
> <xsl:template match="mml "
> xmlns:mml="http://w
ww.w3.org/1998/Math/MathML">
> <xsl:copy>
> <xsl:copy-of select=" *"/>
> <xsl:apply-templates/>
> </xsl:copy>
> </xsl:template>
>
> As far as I know, this means that MathML was only
passed through if it
> had an mml: prefix. I assume this was done because of
the
> non-namespaced template matching. So, is that a correct
assessment? Is
> the requirement for the prefix still present?
Hi Chris,
No, that is not the correct assessment. 8^)
The prefix string does not matter, all that matters in the
stylesheet is
that there is a prefix in the match attribute, and it is
assigned to the
mathml namespace name http://www.w3.org/
1998/Math/MathML using the xmlns
attribute. That assignment can be done on the root element
of the
stylesheet so the namespace scope is the entire stylesheet,
or in the
individual stylesheet elements as is done here.
Your document can use a different prefix, or use the default
namespace, as
long as the namespace name is assigned. The above template
will match on
all of these elements in your document:
<m:mml xmlns:m="http://w
ww.w3.org/1998/Math/MathML">
<math:mml xmlns:math="http://w
ww.w3.org/1998/Math/MathML">
<bob:mml xmlns:bob="http://w
ww.w3.org/1998/Math/MathML">
<mml xmlns="http://w
ww.w3.org/1998/Math/MathML">
It will *not* match on <mml:mml> if the namespace
prefix mml: is not
assigned to the namespace name.
Hope that helps.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs sagehill.net
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-30 16:58:34 |
On 3/30/07, Bob Stayton <bobs sagehill.net> wrote:
> Hi Chris,
> No, that is not the correct assessment. 8^)
Heh, my apologies :]
> The prefix string does not matter, all that matters in
the stylesheet is
> that there is a prefix in the match attribute, and it
is assigned to the
> mathml namespace name http://www.w3.org/
1998/Math/MathML using the xmlns
> attribute. That assignment can be done on the root
element of the
> stylesheet so the namespace scope is the entire
stylesheet, or in the
> individual stylesheet elements as is done here.
>
> Your document can use a different prefix, or use the
default namespace, as
> long as the namespace name is assigned. The above
template will match on
> all of these elements in your document:
>
> <m:mml xmlns:m="http://w
ww.w3.org/1998/Math/MathML">
>
> <math:mml xmlns:math="http://w
ww.w3.org/1998/Math/MathML">
>
> <bob:mml xmlns:bob="http://w
ww.w3.org/1998/Math/MathML">
>
> <mml xmlns="http://w
ww.w3.org/1998/Math/MathML">
(that last example is the one most like what I am looking to
match)
Would the old docbook stylesheets template (the one that did
the
namespace stripping) match on this example? What about the
new version
that keeps the namespaces? I assume that the new version is
able to
match because it can use the namespace instead of just the
prefix (so
it doesn't require a prefix).
Example XML:
<math xmlns="http://w
ww.w3.org/1998/Math/MathML">
<some math ml elements in here/>
</math>
Sorry for so many questions. If I have more I'll resolve
them via
experimentation instead of filling up the mailing list :-]
--
http://chris.chiasson.nam
e/
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|
|
| Re: MathML and
<fo:instream-foreign-object> |

|
2007-03-31 04:20:58 |
Chris Chiasson wrote:
> Would the old docbook stylesheets template (the one
that did the
> namespace stripping) match on this example?
Are you asking whether MathML embeded in DocBook V5.0 will
be processed
by stock DocBook XSL stylesheets?
If so, then answer is yes. Namespace stripping which is done
on DocBook
V5.0 files affects only elements in DocBook namespace
(http://docbook.org/ns/d
ocbook). Other elemens (including MathML
elements) are left untouched during namespace stripping.
--
------------------------------------------------------------
------
Jirka Kosek e-mail: jirka kosek.cz http://xmlguru.cz
------------------------------------------------------------
------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34
member
------------------------------------------------------------
------
Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.
html
|
|
[1-10]
|
|