473,725 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1363
On 6 Apr 2004 13:55:37 -0700, gr******@hotmai l.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
1911
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 was a little amazed at this and wondered if I'd somehow misunderstood the situation. I'm pleased to find that Joel Spolsky shared my amazement and offered some criticism of PHP on these grounds: "When I discovered that the popular web development...
10
2299
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 file, what are those called? Is cout and cin functions? What is the proper term for them a command listed in a header file? Or is it just a "command"?
9
1733
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 generic mechanism to accomplish the comperable tasks demonstrated for Java below. I've already proposed on comp.std.c++ that the next version of the standard specify a similar functionality for a C++ implementation. I know it can be unpopular...
3
1565
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 different frames of a HTML page. So my question is can such an update be done ? Is it necessary that the tables be located in the same frame for the update to work ? Any pointers would be appreciated ? Thanks, -P.
11
17864
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 override them. But they all invoked when the control is in the middle of the resizing process. I'm not using breakpoints, I'm using trace to see which one is invoked and when.
0
1074
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 System.Web;
2
5852
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 Java Applets. Wat are other options (using .Net Framework)? I found out that there are
2
1892
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 tried to reproduce this locally on my machine but can't get bottom section (with the buttons, which user can use to make divs slide in and out of view..) to appear, even though still linking to relevant .js files..
1
2476
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. Send an Ajax request and do the processing 4. Once the processing is done change back the cursor to original style (We are using document.body.style.cursor="default") We are able to achieve 1 to 3 .Req 4 is where we have a issue. The issue is...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.