473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XML,XSD,XSLT -> HTML

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
Jul 20 '05 #1
1 3871


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/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mohit | last post by:
Hi Friends I have to call 1 of the 2 child XSLT files from the Main XSLT file based on some criteria. I want one child XSLT file will be executed by version 1 of XSLT processor and the other by...
8
by: Maciej Wegorkiewicz | last post by:
Hi, I have small experience in XSLT processing and I have a problem which I cannot solve. Can you look at it? I have an input file containing info about bank accounts like this: (...) <acc...
0
by: Mike | last post by:
I'm generating an XSLT document programatically in VB.Net. I'm then trying to apply that XSLT against a cXML document to generate my own internally developed XML document. I'm using RichTextBox...
4
by: Anders Borum | last post by:
Hello! With XSLT 2.0 in the pipeline at the W3 consortium, I'm wondering if Microsoft is planning to support it with the next release of the .NET framework? It sure looks like a promising set of...
4
by: schneider | last post by:
Anyone know if there is a way to dynamicly create a Xslt template/s and use them as an xml transform with-out use files for the Xslt? All the methods I see use files. I want to create a Xslt...
1
by: Dan | last post by:
I have a C# program which executes some XSLT transformations. The XSLT code requires an input intermediate file, generated by other transformations, as its duty is copying some data from an input...
6
by: Christopher | last post by:
I am currently in the process of evaluating the performance hits of moving to the .NET platform for our application. I created a sample project that loads the transforms the same XML and XSLT in...
10
by: daz_oldham | last post by:
Hi I am doing an XSLT that processes (for example) a list of hotels. Each hotel has the attribute @StarRating which is one of the following values: * ** *** ****
1
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT...
2
by: astroboiii | last post by:
New to the whole xml thing and finding w3schools to be an excellent resource. Now down to my question: I have several xml files I need to parse through and grab relevant information from and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.