[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: dbmathml processing problem
/ Sebastian Rahtz <sebastian.rahtz@computing-services.oxford.ac.uk> was heard to say: | > <!-- just send the MathML all the way through... --> | > <xsl:template match="mml:*"> | > <xsl:element name="{name(.)}"> | > <xsl:copy-of select="@*"/> | > <xsl:apply-templates select="node()"/> | > </xsl:element> | > </xsl:template> | | are you sure this is sufficient? I see that I have Am I sure? Uh, no comment. But I think mine is sufficient. Your math mode: | <xsl:template match="m:math"> | <m:math> | <xsl:copy-of select="@*"/> | <xsl:apply-templates mode="math"/> | </m:math> | </xsl:template> | | <xsl:template match="m:*|@*|comment()|processing-instruction()|text()" mode="math"> | <xsl:copy> | <xsl:apply-templates mode="math" select="*|@*|processing-instruction()|text()"/> | </xsl:copy> | </xsl:template> 1. Copies m:* elements, but my template will do that. 2. Copies @*, but my template will do that for m:* elements. Does MathML define any global attributes? 3. Copies comment()s, but that's probably irrelevant since SAX parsers don't have any comment events so XSLT probably never sees them (<sigh/>). 4. Copies PIs. Well, here we're making different choices. You're assuming any PI in a mathml section should be copied literally, I'm assuming the stylesheet ought to get a chance to look at it. It's a tough call. 5. Copies text. But my default text template will do that too. Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | Noble patterns must be fetched http://www.oasis-open.org/docbook/ | here and there from single Chair, DocBook Technical Committee | persons, rather than whole | nations, and from all nations, | rather than any one.--Sir Thomas | Browne
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC