[relaxng-user] rng analysis
David Rosenborg
darolst at pantor.com
Mon May 3 18:21:10 ICT 2004
Hi Dave,
Have you tried using a simplified rng schema as input to your stylesheet?
If not, you could try it, it will make things a lot easier. I've used
this method
to successfully generate <xsl:preserve-space> and <xsl:strip-space>
declarations from rng schemas.
The stylesheet uses rules along these lines:
<xsl:template match="rng:element [
descendant::*[
(self::rng:data or self::rng:text or
self::rng:value or self::rng:list) and
not(ancestor::rng:attribute)]]
">
<!-- Preserve space in this element -->
</xsl:template>
Depending on your required accuracy of the output, the outline above might
be too coarse grained, but a few more templates and predicates should
narrow it down sufficiently.
relaxng.org has links to tools that can perform the simplification step
(e.g. rng2srng).
Cheers,
David
Dave Pawson wrote:
> Analysing a schema is something I've now wanted to do for 3 different
> reasons, and I've a feeling that the stylesheet to do it is quite hairy.
>
> Psst. Have a look at the way they 'drop' a pair of tags on a highlighted
> block of text! Delightful IMHO. I've not seen that since I saw
> some dedicated markup software at Xerox!
>
> regards DaveP
>
>
> _______________________________________________
> relaxng-user mailing list
> relaxng-user at relaxng.org
> http://relaxng.org/mailman/listinfo/relaxng-user
More information about the relaxng-user
mailing list