473,320 Members | 1,930 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,320 software developers and data experts.

Can it be done using XSL?

I have a huge text file which contains a list of all possible services
that can be offered to the users. Let's say it looks like

<services>
<service>srv1</service>
<service>srv2</service>
</services>

But a user is not eligible for all the services. So if a user is
eligible only for service1 then his file will look like

<services>
<service>srv1</service>
</services>

The flags which govern whether the user is eligible for a service are
stored in a database. Is it possible to write an XSL stylesheet which
will inquire any database (including relational and flat file) to
output the final xml shown above. Or can it be done using Java?

Any help or pointers are welcome.

Thanx in advance,
richard
Jul 20 '05 #1
1 1347
On 6 Apr 2004 13:55:37 -0700, gr******@hotmail.com (richard green)
wrote:
The flags which govern whether the user is eligible for a service are
stored in a database. Is it possible to write an XSL stylesheet which
will inquire any database (including relational and flat file) to
output the final xml shown above.
It's possible to do almost anything if you try hard enough....

XSL transforms XML into something else, usually XML. Every piece of
the source data is contained in the source document(s) and the
stylesheet. It can't do something like this on its own.

There are also XSL extensions, either proprietary or some emerging
open standards. These allow you to hook in snippets of JavaScript etc.
Very useful if you need some regexes to do the sort of string handling
that XSL and XPath are usually poor at. As it's just JavaScript (or
JScript), then you can also start connecting out to databases and from
their the world is your lobster.

I have done this in the past, when I had a problem that was basically
an XSL problem, but a lookup to expand a magic code into the current
DB lookup values. Eccentric, but it did the job.

But that isn't how I'd do this. This is a classic example of a simple
DB query / addition to a DOM. No XSL required, although you'll often
use some in a later step. Find an appropriate DOM for your language
choice and read the examples - there should be a suitable one pretty
early on.
Or can it be done using Java?


I did it about three times today, using ASP & JavaScript. A few months
back and I'd have been doing it in Java. Give it a few weeks and I
think I'm using PHP. Every viable language these days has ready
access to an XML DOM (languages that don't are on shaky ground)

--
Smert' spamionam
Jul 20 '05 #2

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

Similar topics

6
by: lkrubner | last post by:
Last year I asked a bunch of questions about character encoding on this newsgroup. All the answers came down to using ord() in creative ways to try to make guesses about multi-byte characters. I...
10
by: da Vinci | last post by:
Hello. First off, I am not sure of the exact jargon used, so I will ask a question regarding it. Then on to my other question. When you use things like cout and cin from the iostream header...
9
by: Steven T. Hatton | last post by:
This was written for the gnu.g++.help list. It rather clearly spells out the most important feature of Java that I believe C++ lacks. I really don't believe the C++ Standard sepcifies enough for a...
3
by: pentium77 | last post by:
Basically I have a situation where I need to update changes occuring in one Text field of a table into another text field located in another table. In addition both the tables are located in...
11
by: Sharon | last post by:
I'm writing a new control derived from UserControl. I need to get an event when the control is done resizing. I tried the Resize, SizeChanged, Move and the Layout events and I also tried to...
0
by: Savin Igor | last post by:
What can be done in Session_End()? Can I get something from Session in this handler? My Global.asax.cs is below using System; using System.Collections; using System.ComponentModel; using...
2
by: batista | last post by:
Hi there, I want to push data from server to client.(No pulling and no "smart pulling" like using xmlhttp) I heard that one possible solution is to use TCP connection using ActX Controls or...
2
by: maya | last post by:
http://news.yahoo.com/news?tmpl=index2&cid=703 down the page, under "More Stories", there's a section with two interchangeable divs which slide back and forth into view.. how is this done? I...
1
by: bibhukdas | last post by:
Hi All, Just to elaborate on the issue. The requirement is to handle this in javascript 1. User clicks on a button 2. Change the cursor style (We are using document.body.style.cursor="wait") 3....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.