Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 6th, 2006, 09:32 AM
Authorized User
Join Date: Dec 2005
Posts: 71
Thanks: 10
Thanked 0 Times in 0 Posts
Default Can XSLT read DTD/schema and Generate XSLT..

Dear All,

It is a XML to XML Conversion. Were as, first xml will have more attribute and element which will then converted according to its DTD/schema's XML. My question is ?. Can we read a DTD/SCHEMA by a XSLT to write a XSLT to generate a valid XML.

Please excuse me if i am wrong any were.


Old November 6th, 2006, 09:39 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

There's no interface in either XSLT 1.0 or 2.0 that allows you to read a schema or DTD into your code at the semantics level. You can read the raw text, of course (or in the case of XML Schema, the raw XML), but it won't help you much unless you want to do an enormous amount of analysis of what you find.

What you can do in XSLT 2.0 is to specify that your output must be valid against a particular schema. The system won't magically create valid output for you, but it will tell you (often at compile time) if your code is generating invalid output.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to generate random numbers in xslt anboss XSLT 3 July 23rd, 2008 09:10 AM
creating a subset of xml schema using XSLT kapar_p XSLT 8 November 21st, 2006 09:46 AM
Validate dependencies using Schema/XSLT shumba XSLT 4 March 22nd, 2006 04:45 PM
DTD base XSLT Grouping ROCXY XSLT 1 February 27th, 2006 07:21 PM
How to generate an Error message from XSLT srini XSLT 2 December 16th, 2003 10:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.