473,651 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="applicati on/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***@Julian5Lo cals.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 3069
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****@h oehrmann.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***@Julian5Lo cals.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:val ue">
<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+sv g 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:val ue">
<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+sv g 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***@Julian5Lo cals.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:val ue">
<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+sv g 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***@Julian5Lo cals.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
438
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 data. Description: An unhandled exception occurred during the execution of the
2
7579
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 I found a simple way and here it is: using System.DirectoryServices; public bool Win2kCredentialsIsValid(string domain, string username, string password) { bool validLogin = false; string adPath = "LDAP://" + domain + "/rootDSE";
14
2231
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 logged exceptions ,raised from objects or calsses which uses them,are some what more hard to dissect. Thanks in advance.
7
16244
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 instance for "05/07/1976" ,I need to make sure that it's in the right format ,It's not later than today and lots of other rules ,Is there somebody who can help me how to that?Can I map it to some sort of xml schema or something?
4
10655
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, and asmx pages ? Thanks :)
11
2115
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 TextBox. But now, when I input a string in the textbox and press Enter key, the form was submit without client javascript validate. Why? And what should I do to enable client validate before submit the form whethe press Enter key or click Submit...
4
4278
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 the "best" way to validate prior to submitting? I could add an onsubmit attribute to the form which executes the validation in Javascript. That way the response doesn't need to be sent before validation takes place. Is this pretty much the way...
1
3105
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 passed the second argument as URL, like "tcp://localhost:8384/Container". From my client program how can i validate this URL ? i.e., before using this url i need to identify whether any service is published on this URL or not. Please help me to...
4
5758
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 inconclusive) ? cheers mark this is the error message
6
3389
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 appliaction. This crash occurs on every clients at same time, event for the client at the local server. I added some logging to the Application_Error method that contains following: Exception of type System.Web.HttpUnhandledException was thrown. at...
0
8795
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8460
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.