OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] MathML and <fo:instream-foreign-object>


----- 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://www.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://www.w3.org/1998/Math/MathML";>

<math:mml xmlns:math="http://www.w3.org/1998/Math/MathML";>

<bob:mml xmlns:bob="http://www.w3.org/1998/Math/MathML";>

<mml xmlns="http://www.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





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