XML,XSD,XSLT -> HTML

Discussion in 'XML' started by Lars Both, Feb 17, 2005.

  1. Lars Both

    Lars Both Guest

    Hi everybody,

    i want to do the following. I have data in a XML-File.
    Additionaly I have a XML Schema which defines valid values for every field
    and alternative options.
    Now I want to create a Stylesheet (for xalan for example) that creates
    HTML respecting the actual valus in the XML file and the default data in
    the Schema.

    An example. The field 'color' has the alternatives red,green and blue
    (defined in the XSD). The user already choose green in an earlier session.
    This is stored in the XML-File. Now the HTML should offer the user a
    select-field with the three options, and 'green' preselected.

    Any ideas?
    Is my approach right? Maybe there is another way to do something similar.
    I am not commited to have 2 files (XSD and XSLT). If there is a way to do
    the same thing with one file, thats great to!

    Any help is appreciated.

    Lars
     
    Lars Both, Feb 17, 2005
    #1
    1. Advertising

  2. Lars Both wrote:


    > i want to do the following. I have data in a XML-File.
    > Additionaly I have a XML Schema which defines valid values for every
    > field and alternative options.
    > Now I want to create a Stylesheet (for xalan for example) that creates
    > HTML respecting the actual valus in the XML file and the default data
    > in the Schema.
    >
    > An example. The field 'color' has the alternatives red,green and blue
    > (defined in the XSD). The user already choose green in an earlier
    > session. This is stored in the XML-File. Now the HTML should offer the
    > user a select-field with the three options, and 'green' preselected.
    >
    > Any ideas?


    XSLT 2.0 and XPath 2.0 have (optional) XSD schema support, Saxon is
    already available as an implementation trying keep up with the XSLT
    2.0/XPath 2.0 (and even XQuery 1.0) specifications while they reach the
    final status. However the schema aware version of Saxon is a commercial
    product, check <http://www.saxonica.com/> for details.

    With XSLT/XPath 1.0 all you can do is write your own stylesheet
    templates extracting for instance the enumerated values from the schema.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Feb 17, 2005
    #2
    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. Markus
    Replies:
    1
    Views:
    1,162
    Markus
    Nov 22, 2005
  2. Matt
    Replies:
    3
    Views:
    37,298
    MKNDK
    Sep 11, 2008
  3. stiank81
    Replies:
    4
    Views:
    15,493
    stiank81
    Jun 26, 2005
  4. Rushi
    Replies:
    1
    Views:
    575
  5. Replies:
    0
    Views:
    575
Loading...

Share This Page