[relaxng-user] rng analysis

Dave Pawson dpawson at nildram.co.uk
Mon May 3 18:21:26 ICT 2004


At 17:21 03/05/2004, David Rosenborg wrote:
>Hi Dave,
>
>Have you tried using a simplified rng schema as input to your stylesheet?

? What's the definition of 'simplified' please?

>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).

Mmm. Not seen that David.
   Thanks, I'll take a look.
   What's its purpose?

regards DaveP




More information about the relaxng-user mailing list