XML,XSD,XSLT -> HTML

L

Lars Both

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
 
M

Martin Honnen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top