meta-stylesheets info

Discussion in 'XML' started by ^Alan^, Dec 14, 2005.

  1. ^Alan^

    ^Alan^ Guest

    Hi!
    where can I find some infos about meta-stylesheets techinque (a document
    XSLT which generates other one)? I've seen Schematron, but which are other
    most popular example of this use of XSLT?

    thanks!

    Alan
     
    ^Alan^, Dec 14, 2005
    #1
    1. Advertising

  2. ^Alan^ wrote:
    > Hi!
    > where can I find some infos about meta-stylesheets techinque (a document
    > XSLT which generates other one)?


    ?? you mean an xslt document that generates an xslt document?

    > I've seen Schematron, but which are other


    Schematron is a xml schema language, like
    XMLSchema.
    Has not mucht to do with xslt

    > most popular example of this use of XSLT?
    >


    ?? dont now what you mean.

    > thanks!
    >
    > Alan
    >
    >
     
    Tjerk Wolterink, Dec 14, 2005
    #2
    1. Advertising

  3. ^Alan^

    ^Alan^ Guest

    Schematron is based on this technique:
    http://www.ldodds.com/papers/schematron_xsltuk.html

    I'm looking for other examples of this use of XSLT...

    "Tjerk Wolterink" <> ha scritto nel messaggio
    news:dnq5gv$8uq$...
    > ^Alan^ wrote:
    >> Hi!
    >> where can I find some infos about meta-stylesheets techinque (a document
    >> XSLT which generates other one)?

    >
    > ?? you mean an xslt document that generates an xslt document?
    >
    >> I've seen Schematron, but which are other

    >
    > Schematron is a xml schema language, like
    > XMLSchema.
    > Has not mucht to do with xslt
    >
    >> most popular example of this use of XSLT?
    >>

    >
    > ?? dont now what you mean.
    >
    >> thanks!
    >>
    >> Alan
     
    ^Alan^, Dec 14, 2005
    #3
  4. ^Alan^

    Soren Kuula Guest

    ^Alan^ wrote:
    > Schematron is based on this technique:
    > http://www.ldodds.com/papers/schematron_xsltuk.html
    >
    > I'm looking for other examples of this use of XSLT...
    >
    > "Tjerk Wolterink" <> ha scritto nel messaggio
    > news:dnq5gv$8uq$...
    >
    >>^Alan^ wrote:
    >>
    >>>Hi!
    >>>where can I find some infos about meta-stylesheets techinque (a document
    >>>XSLT which generates other one)?


    If you want to see more of what you can do with languages that can
    generate themselves, and it doesn't _have_ to be XSLT, look at the
    programming language Scheme. Lots a fun. You can write compilers,
    partial validators and loads of other things in a few lines.

    The only magic thing about it in XSLT is to have the stylesheet
    processor know what in the stylesheet-spewing stylesheet is code and
    what is data. There's a special namespace-alias element for that.

    Exercise: Make a stylesheet that takes 2 paramters, a and b. It
    generates a stylesheet that does the identity transform, except that
    elements named a are replaced by elements named b...

    Soren
     
    Soren Kuula, Dec 15, 2005
    #4
  5. ^Alan^

    Soren Kuula Guest


    > Exercise: Make a stylesheet that takes 2 paramters, a and b. It
    > generates a stylesheet that does the identity transform, except that
    > elements named a are replaced by elements named b...


    I mean, the value of b instead of the value of a, not b instead of a.

    > Soren
     
    Soren Kuula, Dec 15, 2005
    #5
  6. ^Alan^

    Ed Beroset Guest

    ^Alan^ wrote:
    > Schematron is based on this technique:
    > http://www.ldodds.com/papers/schematron_xsltuk.html
    >
    > I'm looking for other examples of this use of XSLT...


    I've used this technique recently. In my particular case, the task was
    to create an HTML page with color-coded text based on both the values
    from an input XML file and an XSLT. For example, let's say the XML file
    contained the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <porridge>
    <tempC>37</tempC>
    <cooked>true</cooked>
    </porridge>

    Now imagine that we want to transform this into an HTML file in which
    the temperature is color coded; blue for too cold, red for too hot, and
    green for just right. Since these temperatures are somewhat subjective,
    I needed a way to enter the list of rules. I could have built the rules
    directly into a stylesheet, but ultimately I decided to have the rules
    in more-or-less human readable XML and then generate the XSLT. Also,
    this had the advantage of making it easier to generate an HTML page
    which summarized the rules. Here are the transformations:

    rules.xml + rules2html.xsl = rules.html
    rules.xml + rules2xsl.xsl = rules.xsl
    porridge.xml + rules.xsl = porridge.html

    If you need more details, or you're stuck on one particular thing, let
    me know.

    Ed
     
    Ed Beroset, Dec 15, 2005
    #6
  7. "^Alan^" <> wrote in message
    news:43a05381$0$16205$...
    > Hi!
    > where can I find some infos about meta-stylesheets techinque (a document
    > XSLT which generates other one)? I've seen Schematron, but which are other
    > most popular example of this use of XSLT?



    It is much more interesting to use higher-order functions in XSLT. Because a
    higher-order function can return another (dynamically created function) as
    the result of its application, one does not need to generate code, which
    then has to be re-compiled.


    Implementing and using higher-order functions is described in the FXSL
    documentation and in this presentation at Extreme Markup Languages 2003:

    http://www.mulberrytech.com/Extreme/Proceedings/xslfo-pdf/2003/Novatchev01/EML2003Novatchev01.pdf


    Cheers,
    Dimitre Novatchev
     
    Dimitre Novatchev, Dec 16, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Meta Info and Response.Write

    Guest, Dec 31, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    495
    Guest
    Jan 2, 2004
  2. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    573
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  3. Duane Johnson

    Meta methods to govern meta data?

    Duane Johnson, Oct 25, 2005, in forum: Ruby
    Replies:
    6
    Views:
    252
    Adam Sanderson
    Oct 28, 2005
  4. Erik Veenstra

    Meta-Meta-Programming

    Erik Veenstra, Feb 7, 2006, in forum: Ruby
    Replies:
    29
    Views:
    416
    Erik Veenstra
    Feb 8, 2006
  5. Erik Veenstra

    Meta-Meta-Programming, revisited

    Erik Veenstra, Jul 21, 2006, in forum: Ruby
    Replies:
    21
    Views:
    462
    Erik Veenstra
    Jul 25, 2006
Loading...

Share This Page