473,395 Members | 1,623 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,395 software developers and data experts.

XLST: is there a formal definition?

Hello,

I am looking for a formal definition of XSLT. Either a DTD or an XML
Schema, whatever. Is there such a thing ? There is for instance one for
XML Schema itself at http://www.w3.org/2001/XMLSchema.dtd .

My problem is that I have a big set of XSLT files which may contain
errors: for instance, use of XLST features that were only in the draft
XSLT norm, but which Microsoft IE still supports. A DTD or XML Schema
would greatly help me in checking the XSLT files.

Thanks for any help

Pascal

Jul 20 '05 #1
4 2114


Pascal Sartoretti wrote:
I am looking for a formal definition of XSLT. Either a DTD or an XML
Schema, whatever. Is there such a thing ? There is for instance one for
XML Schema itself at http://www.w3.org/2001/XMLSchema.dtd .

My problem is that I have a big set of XSLT files which may contain
errors: for instance, use of XLST features that were only in the draft
XSLT norm, but which Microsoft IE still supports. A DTD or XML Schema
would greatly help me in checking the XSLT files.


A DTD can't exist as an XSL stylesheet contains arbritray result
elements, there is however a DTD fragment
http://www.w3.org/TR/xslt#dtd
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Martin Honnen wrote:
A DTD can't exist as an XSL stylesheet contains arbritray result
elements


Oops, you are right... However, would it be possible to define an XSLT
transform that would scrap out all non-XSLT tags and then return a
"pure" XSLT document, which could be checked against a DTD or XML schema?

Pascal

Jul 20 '05 #3


Pascal Sartoretti wrote:
Martin Honnen wrote:
A DTD can't exist as an XSL stylesheet contains arbritray result elements

Oops, you are right... However, would it be possible to define an XSLT
transform that would scrap out all non-XSLT tags and then return a
"pure" XSLT document, which could be checked against a DTD or XML schema?


I think such an XSLT stylesheet could be written.
As for an XML schema, that even allows you to define an element to have
children in a different, abritrary namespace that are skipped during
validation, an example for that is at
http://www.webmethods.com/1999/XSL/Transform/
I have just found it through googling so I can't tell you how well it is
written but at least the comments at the beginning indeed suggest that
validation is skipped for abritrary result elements.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #4
In article <c0**********@dc2-03-su-03.dc2.solpa.net>,
Pascal Sartoretti <ps*@elca.ch> wrote:
% Martin Honnen wrote:
% > A DTD can't exist as an XSL stylesheet contains arbritray result
% > elements
%
% Oops, you are right... However, would it be possible to define an XSLT
% transform that would scrap out all non-XSLT tags and then return a
% "pure" XSLT document, which could be checked against a DTD or XML schema?

You could just copy all the elements in the xslt name space:

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:template match='xsl:*|@*'>
<xsl:copy>
<xsl:apply-templates select='node()|@*'/>
</xsl:copy>
</xsl:template>

<xsl:template match='*'>
<xsl:apply-templates match='node()|@*'/>
</xsl:template>
</xsl:stylesheet>
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vital Lobachevsky | last post by:
Hi! I'm absolutely newbie with XSLT. Please, help me with this example. I have simple XML document like this: <skip /> <aaa> <link url="url1" /> <link url="url2" />
44
by: Steven T. Hatton | last post by:
This may seem like such a simple question, I should be embarrassed to ask it. The FAQ says an object is "A region of storage with associated semantics." OK, what exactly is meant by "associated...
39
by: Antoon Pardon | last post by:
I was wondering how people would feel if the cmp function and the __cmp__ method would be a bit more generalised. The problem now is that the cmp protocol has no way to indicate two objects are...
3
by: Hai Nguyen | last post by:
I would like to know after transforming my datatables which store in dataset into XML form. Now I want to save it into a file and also create a XLST file to read it. How can I do that? Would you...
3
by: Hai Nguyen | last post by:
Sorry I don't have code yet. I'm asking for solutions which can help me solve the problem. This is the first time I have to cope this situation, hence I'm clueless how to start. I would like to ask...
1
by: Adrian | last post by:
Hi No sure if xlst is the correct choice! or if it is how I would use it from within a windows VB application! I had XML data help in an xmlelements object and I want to format the data and...
1
by: ad | last post by:
Hi, How can I use xlst to display a xml file in asp.net?
1
by: dave_kajinsky | last post by:
Hello all, I would like to do something with xlst, perhaps I can get help from this group? Here it goes: I've got 2 files: an ascii file and a file that identifies tokens in the ascii file. ...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.