[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Program to evaluate a set of DTD files

Subject: RE: Program to evaluate a set of DTD files
From: "Echlin, Robert" <Robert.Echlin@xxxxxxxxxxxxx>
Date: Thu, 7 Jun 2012 16:18:46 +0000
RE:  Program to evaluate a set of DTD files
Hi, Tony.
I will look at the Perl solution.
I hoped there was a native, maybe even canonical, solution.
Do those SGML utilities do the right thing for XML DTD's?
Do the differences matter when you are dealing with DTD's?
I haven't touched SGML since I was at OmniMark in 2004.

Thanks,
Rob

Rob Echlin, 1.613.270.5796 | Skype: rob.echlin.wr


-----Original Message-----
From: Tony Graham [mailto:tgraham@xxxxxxxxxx]
Sent: Wednesday, June 06, 2012 4:58 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Program to evaluate a set of DTD files

On Wed, June 6, 2012 8:43 pm, Echlin, Robert wrote:
> Given a set of DTD files, with entities and parameter entities in two or
> more files, including entities redefined in more than one place
> (overridden), is there a way to ask a parser to describe the net effect
> for each element?
> For instance, can XSLT ask the parser for the allowed elements or
> attributes in a given element, and the actual element rule, example:
> -   title contains  (#PCDATA | b | i )*
>
> The purpose of this is to test that the result of using a given DTD is
> still unchanged after I change the entities, by for instance, replacing
> some text with a parameter entity.

The way that I usually do that sort of thing is with Perl rather than
XSLT.  See, e.g., DTDParse by Earl Hood [1] that includes "dtddiff (along
with dtddiff2html) ... that performs a context-like diff between two
parsed DTDs" [2].

If you can get an XML representation of each DTD, e.g., using dtd2xsd.pl
[3], then it becomes easier to process using XSLT.

Regards,


Tony Graham                                   tgraham@xxxxxxxxxx
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL-FO and XSLT consulting, training and programming

[1] http://www.mhonarc.org/release/SGML-DTDParse/2.00/
[2] http://www.mhonarc.org/release/SGML-DTDParse/2.00/Changes
[3] http://www.w3.org/2000/04/schema_hack/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.