[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Tests Framework for DocBook Stylesheets & Customizations?
Hi Dave, thanks for your reply! :) On Thu, 16 Oct 2014 12:25:40 +0100 davep <davep@dpawson.co.uk> wrote: > [...] > > How do *you* develop and test your stylesheets? Has anybody used > > such frameworks? Any help is greatly appreciated. :) > > xspec is for the general case. Question: Is docbook sufficiently > 'firm' to allow a specific solution? As Norman used XSpec for the DocBook XSLT2 stylesheets, I would say it is sufficiently "firm". ;) > I.e. for any given input at the > document level, we should be able to specify the 'required' / > expected output? That would allow a diff of two files, albeit an XML > diff (deep-equals?) which would make for easier testing of the (x)html > output. > For fo, would the xsl-fo be sufficient? I'd guess so. Hence a similar > solution would be adequate. An XML diff came also to my mind. However, as most XML diffs are commercial, I wouldn't recommend it as solution in a purely open source environment. Another reason why I didn't investigate more such power isn't really necessary. I think, in most cases we are only interested in answers of the question "is attribute X there?", "does attribute X has the value Z?", "is this parent-child relationship correct?", or "does the expected text show up?" If whitespace doesn't matter (in most cases it won't), the XML output could be either a) investigated with an XPath expression, or b) "normalized" and a normal diff applied. I guess it would be a lot faster than any XML diffs. ;) Apart from this technical implementations, I'm more interested in the overall structure. What would be a "good" test environment for stylesheet customizations? Or even the DocBook stylesheets itself? It seems to me, the XSLT 1 stylesheets are used a lot and they won't be replaced soon by the XSLT 2 incarnations. If useful and technical possible, why not define/recommend/add some "test environment" to help contributors and developers? :) -- Gruß/Regards, Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]