By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,711 Members | 2,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,711 IT Pros & Developers. It's quick & easy.

Validate client-side XSLT result of xhtml-math-svg

P: n/a
For info on the context of my question see the end of this posting.

From http://www.w3.org/TR/XHTMLplusMathMLplusSVG/:
This profile enables mixing XHTML, MathML and SVG in a same document
using XML namespaces [XMLNS]mechanism, while allowing validation of
such a mixed-namespace document.
How can I validate the result of client-side XSLT transform which has
the following?

<xsl:output
method="xml"
media-type="application/xhtml-math-svg"
encoding="UTF-8"
indent="yes"
doctype-public=
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
doctype-system=
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/
>
The example is here:

http://emle.sourceforge.net/emle0200...le_lab_009.xml
http://emle.sourceforge.net/emle0200...le_lab_009.xsl
http://emle.sourceforge.net/emle0200...mle_lab_009.js
http://emle.sourceforge.net/emle0200...le_lab_009.css
http://emle.sourceforge.net/emle0200...le_lab_009.xsd
--------------------------------------------------------------------
Context:

I am working on the second generation of a collection of applets that
use the interactive aspect of a computer with graphics to provide an
experience for internalizing low level math concepts. For the current
state of this project see:

Electronic Mathematics Laboratory Equipment
http://emle.sourceforge.net/index.shtml

The first generation uses TCL/Tk applets embedded in web pages. I am
continuing from the first generation proof of concept. Those applets
were hand coded with cut and paste of TCL/Tk snippets in a poor style.
See:

Introduction - Emle V1.0.0
http://emle.sourceforge.net/index_010000.shtml

I am now working on a frame work for creating the applets that does not
require the level of programming skills needed in the first generation
proof of concept. I am learning some newer technologies for this
purpose: XML, XML Schema, XPath, XSLT, XHTML, MathML, SVG, Javascript,
DOM, CSS, HTML 4.01 and others. I have already found that by using XML I
can create simple documents that are transformed by XSLT into web pages
with XHTML controls that have Javascript code displaying SVG graphics.
With this an author will be able to create XML files without having to
write much XHTML nor Javascript.

Currently I am using:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3)
Gecko/20070309 Firefox/2.0.0.3

with the intent of keeping to standards based features. I am not
concerned about poor functionality on other browsers unless the feature
being used is standards based. At time time, I may even ignore all other
browsers in order to focus on other issues.

--
C.W.Holeman II | cw***@Julian5Locals.com-5 http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks
May 27 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
C.W.Holeman II wrote:
How can I validate the result of client-side XSLT transform
Question: Why do you need to explicitly validate it?

If you've written your stylesheet correctly, the document should be
correct. If you haven't, a validation failure in the user's machine
isn't helpful to them; all they can do is complain to you.

(I'd also suggest you consider moving to schema-based validation rather
than DTD-based. XSLT is namespace-aware, and DTD validation doesn't
always "play nice" with full namespace-aware processing.)

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 27 '07 #2

P: n/a
* C.W.Holeman II wrote in comp.text.xml:
>Currently I am using:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3)
Gecko/20070309 Firefox/2.0.0.3

with the intent of keeping to standards based features. I am not
concerned about poor functionality on other browsers unless the feature
being used is standards based. At time time, I may even ignore all other
browsers in order to focus on other issues.
http://lists.w3.org/Archives/Public/...6Nov/0000.html is a
JavaScript-based DTD Validator. It's incomplete as noted in the message,
but if you'd like to use it I could generate the appropriate DTD for you
(the format should be easy to understand and recreate though).
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
May 27 '07 #3

P: n/a
Joe Kesselman wrote:
C.W.Holeman II wrote:
>How can I validate the result of client-side XSLT transform

Question: Why do you need to explicitly validate it?

If you've written your stylesheet correctly, the document should be
correct.
That causes me to believe you have not looked at a lot of what I have
written. :-)
If you haven't, a validation failure in the user's machine
isn't helpful to them; all they can do is complain to you.
At this point I am still working on learning how to use these
technologies so I need the feedback.
(I'd also suggest you consider moving to schema-based validation rather
than DTD-based. XSLT is namespace-aware, and DTD validation doesn't
always "play nice" with full namespace-aware processing.)
Where do I find it? The closest I have found is in
http://www.w3.org/TR/XHTMLplusMathMLplusSVG/
An XHTML 1.1 + MathML 2.0 + SVG 1.1 DTD driver is provided in
section 2.1. The possibility of combining those modules written in XML
Schema [XMLSchema] might be explored when XML Schemas for XHTML
[XHTMLMODSchema] and others become available and mature.
--
C.W.Holeman II | cw***@Julian5Locals.com-5 http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks
May 27 '07 #4

P: n/a


I don't think firefox uses a validating parser so I'm not sure that you
can validate in the browser. For debugging purposes you can of course
execute the stylesheet with an external xslt engine, saving the results
to a file, and validate that file.

The styesheet currently has several templates like

<xsl:template match="emle:value">
<emleo:value>

which generate elements in the emleo namespace, the presence of such
elements in the result will mean that the result is not valid to the
xhtml+mathml+svg DTD, which only allows eleemnts from those three
namespaces.

David
--
http://dpcarlisle.blogspot.com
May 27 '07 #5

P: n/a
Where do I find it? The closest I have found is in
http://www.w3.org/TR/XHTMLplusMathMLplusSVG/
I think what you want is something more recent such as
http://www.w3.org/TR/MathML/appendix...rsing.usingxsd
Caveat: I haven't checked the XHTML schema for exactly where this would
and wouldn't be permitted.

SVG is more of a problem, since I'm not sure there is an official XML
Schema for SVG yet. So if you want to validate SVG you may indeed be
forced to use DTDs as a stopgap.

And if you want to use the MathML entities, you do need to bring in the
DTD even if your main validation is against schemas.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 29 '07 #6

P: n/a
David Carlisle wrote:
>

I don't think firefox uses a validating parser so I'm not sure that you
can validate in the browser. For debugging purposes you can of course
execute the stylesheet with an external xslt engine, saving the results
to a file, and validate that file.
I used CookTop 2.5. XML->Run XSLT-and-Save-to-File.
http://validator.w3.org/
Saving the results to:

http://emle.sourceforge.net/emle0200...e_lab_010.html
The styesheet currently has several templates like

<xsl:template match="emle:value">
<emleo:value>

which generate elements in the emleo namespace, the presence of such
elements in the result will mean that the result is not valid to the
xhtml+mathml+svg DTD, which only allows eleemnts from those three
namespaces.
I replaced all of the emleo namespace prefix elements with <divfor
the elements and <spanfor the attributes. Then removed the MathML
namespace prefixes from all of the <mathand nested elements. That
all or most of the errors.

Then the results from the validaotr were "This Page Is Valid XHTML 1.1
plus MathML 2.0 plus SVG 1.1!"

http://emle.sourceforge.net/emle0200...e_lab_010.html
http://emle.sourceforge.net/emle0200...e_lab_010.html
--
C.W.Holeman II | cw***@Julian5Locals.com-5 http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks
May 30 '07 #7

P: n/a
Correction to mis-sent previous posting.

David Carlisle wrote:
>

I don't think firefox uses a validating parser so I'm not sure that
you can validate in the browser. For debugging purposes you can of
course execute the stylesheet with an external xslt engine, saving the
results to a file, and validate that file.
I used CookTop 2.5. XML->Run XSLT-and-Save-to-File placing the saved
results at:

http://emle.sourceforge.net/emle0200...e_lab_010.html

Then used http://validator.w3.org/ for the validation.
The styesheet currently has several templates like

<xsl:template match="emle:value">
<emleo:value>

which generate elements in the emleo namespace, the presence of such
elements in the result will mean that the result is not valid to the
xhtml+mathml+svg DTD, which only allows eleemnts from those three
namespaces.
I replaced all of the emleo namespace prefix elements with <divfor
the elements and <spanfor the attributes. Then removed the MathML
namespace prefixes from all of the <mathand nested elements. That
corrected all or most of the errors.

Then the results from the validaotr were "This Page Is Valid XHTML 1.1
plus MathML 2.0 plus SVG 1.1!"

http://emle.sourceforge.net/emle0200...le_lab_010.xsd
http://emle.sourceforge.net/emle0200...le_lab_010.xml
http://emle.sourceforge.net/emle0200...le_lab_010.xsl
http://emle.sourceforge.net/emle0200...mle_lab_010.js
http://emle.sourceforge.net/emle0200...le_lab_010.css

http://emle.sourceforge.net/emle0200...e_lab_010.html

--
C.W.Holeman II | cw***@Julian5Locals.com-5 http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks
May 30 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.