473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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
7 3044
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
* 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
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


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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: FabFreddy | last post by:
Hi, I can't find out what the problem is with the error message below! I get it when I go from one to another page with controls in these pages. Anyone knows??? THX Unable to validate...
2
by: Steffen Balslev | last post by:
I tried to find a way to validate user credentials using C#, searching google and lots of other news and kb sites left me without a solution. You can use a SSPI but it's that easy to implement so...
14
by: Julia | last post by:
Hi, When writing class library do you validate ALL incoming parameters? Is this a good approach,to valid them ALL!!!,and throw exceptions? I realize that if I am not validating them,than my...
7
by: Ali-R | last post by:
Hi all, I am getting a CSV file like this from our client: "C1","2","12344","Mr","John","Chan","05/07/1976"......... I need to validate **each filed value** against a set of rules ,for...
4
by: Mr. x | last post by:
Hello, I know about the validator on : http://validator.w3.org , which can validate html pages. I just new to this validator. How can I validate (if it can be - by this validator) aspx pages,...
11
by: wolf | last post by:
There are three webcontrol on my asp.net form: a TextBox, a submit button and a RegularExpressionValidator. And I had set ControlToValidate property of the RegularExpressionValidator to the...
4
by: Wysiwyg | last post by:
I need to validate a form to ensure that all of the fields add up correctly. I can't do this while the user is entering data since validation needs to be done after the entry is completed. What's...
1
by: Prakash | last post by:
Hi Friends, I am developing application based on .net Remoting. In my client application i have accessed the remote object by Activator.GetObject function. In this GetObject function, i have...
4
by: Mike Fellows | last post by:
running IIS on a single server, hosting pages on an intranet basis, one single user out of 50 is having an unable to validate data issue how do i fix this (the microsoft KB is a little...
6
by: Solje | last post by:
Im developing an ASP.NET application used for maintinance purpose and it may be idle for some ours. The application crash with the error shown below when the user click on some contol in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.