Loading ...
Sorry, an error occurred while loading the content.
 

Re: [rng-users] documenting Relax NG

Expand Messages
  • George Cristian Bina
    Hi Dave, ... Sorry but I cannot follow you. Can you please expand a little? My question is if we should focus on patterns only or not. A schema is formed from
    Message 1 of 31 , Jul 1, 2005
      Hi Dave,

      >>* Will a documentation of the patterns be enough? Or one should try to
      >>determine the name classes and start from there?
      >
      >
      > Look to rng itself, and what's available.
      > We could all do it, if the schema is 'special' to our way of working.
      > What can you do that is within the rng rec itself?
      >
      > regards DaveP

      Sorry but I cannot follow you. Can you please expand a little?
      My question is if we should focus on patterns only or not. A schema is
      formed from patterns and inside patterns we can find name classes for
      elements and attributes. We can present for instance each pattern and
      specify its content until we reach pattern references. Is that enough?
      Another possible approach will be to try to determine for instance that
      there is a person element that has certain attributes and that can
      contain some other elements and document that (like expanding from a
      name class following eventual pattern references until we reach other
      name classes).

      Best Regards,
      George
      ---------------------------------------------------------------------
      George Cristian Bina
      <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
      http://www.oxygenxml.com
    • Eric van der Vlist
      Sylvain, ... I had to do something similar for one of my customers and my conclusion is that it s impossible in the general case without XSLT extensions (at
      Message 31 of 31 , Jul 4, 2005
        Sylvain,

        On lun, 2005-07-04 at 10:24 +0200, Sylvain Hellegouarch wrote:
        > Thanks for all your comments and help.
        >
        > From what I can understand, there is no easy solution to generate an
        > XML document from a RelaxNG schema (well besides using an XML editor).
        >
        > It's fine. I guess I'll stay with XSLT to generate my documents.

        I had to do something similar for one of my customers and my conclusion
        is that it's impossible in the general case without XSLT extensions (at
        last in XSLT 1.0) and that XSLT isn't the best language do do this kind
        of exercise.

        To generate samples that follow different combinations of the different
        choices in a schema, I see two basic solutions:

        * The first one is to follow each alternative to generate all the
        combinations. In that case, the fact that XSLT is side effect
        free doesn't help...
        * The second one is to choose the alternative randomly. In this
        other case, XSLT/XPath 1.0 misses a "random()" function.

        For these reasons, I ended using Python instead of XSLT to do the job...

        Hope this helps.

        Eric

        >
        --
        Read me on Advogato.
        http://advogato.org/person/vdv/
        ------------------------------------------------------------------------
        Eric van der Vlist http://xmlfr.org http://dyomedea.com
        (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
        (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
        ------------------------------------------------------------------------
      Your message has been successfully submitted and would be delivered to recipients shortly.