473,833 Members | 2,199 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A simple XML & XSLT based Web Form

Hello,

I've tried the FAQ and some minutes in googl'ing but was not happy with
what I got. Basically I'd like to get a _simple_ example on how I could
create a web based (portable across all platforms and applications) form
for a simple web application using XML technologies.

I would like to have something like follows:

An XML DB containing that looks roughly like follows:

<?xml version="1.0" encoding="UTF-8"?>
<!-- my foobar DB --!>
<MY_FOORBAR_D B>
<ITEM title="../aaa/bbb.ext">
<KEYWORDS> Credite, Pisones, isti, tabulae, fore </KEYWORDS>
</ITEM>
<ITEM title="../ccc/aaa.ext">
<KEYWORDS> librum, persimilem, cuius, uelut, aegri </KEYWORDS>
</ITEM>
<ITEM title="../bbb/aaa.ext">
<KEYWORDS> somnia, uanae, fingentur, species, ut, nec </KEYWORDS>
</ITEM>
<ITEM title="../ddd/bbb.ext">
<KEYWORDS> pes, nec, caput, uni, reddatur, formae </KEYWORDS>
</ITEM>
</MY_FOOBAR_DB>

An index.xml which would basically be like an index.html with a query
form and a SUBMIT button as input type like follows:

Please enter keywords to search: _______________ __________ [SUBMIT]

Which would then create an appropriate XSLT file (using the keywords as
search parameters) _and_ call the XML DB with it, resulting in the
display of the selected ITEMS which contain the AND and OR match of the
submitted keywords.

In a second stage I'd like to add a form which takes an ITEM and a
variable amount of KEYWORDSs and adds it to the XML DB dynamically, when
hitting SUBMIT.

I know that I can do this with perl, python, bash, c, <insert other no
portable languages> but I thought that using a meta language would be an
interesting approach to solve this problem. Unfortunately I have not
found a simple enough example that would show me the solution to this
problem.

Basic questions for me right now (until I get the picture) are:

1. Can XML & XSLT be used to generate persistent files using IIS or
apaches as web servers and firefox or IE as clients?
2. Is regexp possible with XSLT?
3. How are Unicode characters passed as arguments to the XSLT processor?

Best regards,
Roberto Nibali, ratz
--
echo
'[q]sa[ln0=aln256%Pln2 56/snlbx]sb3135071790101 768542287578439 snlbxq' | dc
Jul 20 '05 #1
4 2329
el********@nosp am.com wrote:
Hello,

I've tried the FAQ and some minutes in googl'ing but was not happy with
what I got. Basically I'd like to get a _simple_ example on how I could
create a web based (portable across all platforms and applications) form
for a simple web application using XML technologies.

I would like to have something like follows:

An XML DB containing that looks roughly like follows:

<?xml version="1.0" encoding="UTF-8"?>
<!-- my foobar DB --!>
<MY_FOORBAR_D B>
<ITEM title="../aaa/bbb.ext">
<KEYWORDS> Credite, Pisones, isti, tabulae, fore </KEYWORDS>
</ITEM>
<ITEM title="../ccc/aaa.ext">
<KEYWORDS> librum, persimilem, cuius, uelut, aegri </KEYWORDS>
</ITEM>
<ITEM title="../bbb/aaa.ext">
<KEYWORDS> somnia, uanae, fingentur, species, ut, nec </KEYWORDS>
</ITEM>
<ITEM title="../ddd/bbb.ext">
<KEYWORDS> pes, nec, caput, uni, reddatur, formae </KEYWORDS>
</ITEM>
</MY_FOOBAR_DB>

[cut]


I did not read your whole story but i think it is better to store your keywords like this:

<item title="../aa/bb.ext">
<keywords>
<keyword>Credit e</keyword>
<keyword>Pisone s</keyword>
<keyword>Isti </keyword>
</keywords>

This is better because in your case you are separating information elements using your own comma like
markup syntax. But the whole reason d'existance of xml is to markup information elements.

Nice word: reason d'existance :-)
Jul 20 '05 #2
> I did not read your whole story but i think it is better to store your
keywords like this:

<item title="../aa/bb.ext">
<keywords>
<keyword>Credit e</keyword>
<keyword>Pisone s</keyword>
<keyword>Isti </keyword>
</keywords>
Indeed, thanks. It would be kind of stupid to have the XLST processor do
commata stripping and try to do pattern matching on a variable amount of
parameters.
This is better because in your case you are separating information
elements using your own comma like
markup syntax. But the whole reason d'existance of xml is to markup
information elements.
Correct, so my original request remains, but of course with your version
of separating information elements.
Nice word: reason d'existance :-)


Horace salutes you ;).

Cheers,
Roberto Nibali, ratz
--
echo
'[q]sa[ln0=aln256%Pln2 56/snlbx]sb3135071790101 768542287578439 snlbxq' | dc
Jul 20 '05 #3
Tempore 11:04:00, die Friday 11 February 2005 AD, hinc in foro {comp.text.xml} scripsit Tjerk Wolterink <tj***@wolterin kwebdesign.com> :
Nice word: reason d'existance :-)


Shouldn't that be: raison d'existance?

--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Veni, vidi, wiki (http://www.wikipedia.org)
Jul 20 '05 #4
Actually, it's "existence" but the correct expression is "raison d'être".

"Joris Gillis" <ro**@pandora.b e> a écrit dans le message de
news:op******** ******@news.pan dora.be...
Tempore 11:04:00, die Friday 11 February 2005 AD, hinc in foro {comp.text.xml} scripsit Tjerk Wolterink <tj***@wolterin kwebdesign.com> :
Nice word: reason d'existance :-)


Shouldn't that be: raison d'existance?

--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Veni, vidi, wiki (http://www.wikipedia.org)

Jul 20 '05 #5

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

Similar topics

2
2029
by: Colin Fox | last post by:
I've got a bit of a problem, and I'm stumped. I'm working on a system to create web pages based on XML files. I'd like to be able to use a variety of techniques to make the coding faster & more maintainable. To that end, I have some XML and XSLT files that I use as 'subroutines' to build the pages faster. All pretty standard stuff. My problem is this: I have two xml/xslt file pairs that I'm using, and
12
9487
by: Sammy | last post by:
Hi, my mind is going crazy. I have tried everything I can think of to no avail. I have tried Disable Output Escaping. I tried to think of a way of enclosing the attribute data in a CDATA element. That did not parse. Here is my question: How can I get attribute values to not get converted from &apos; to '
4
1985
by: Gauthier | last post by:
Hi, I've a simple issue with the use of extension objects. I'm trying to call a text formating method from an object that I add to my arguments collection, this method take an input string and output the formatted string. So far everything process correctly (the method is called without any issue) but my problem is that the output is htmlencoded, it means that my method (wich work as intended in other contexts) is called but the...
4
1316
by: gouranga | last post by:
Sablotron keeps giving an error (non-XSL instruction) on the line with this code: <xsl:result-document href="slideshow/index.html" format="html"> Is this implemented in Sablotron? It's quite urgent :) Thx in advance.
0
1055
by: Omatase | last post by:
I have an xslt file I need to open at runtime. Here is my configuration: main assembly (dll) |-----xslt file unit test assembly I have a reference to my main assembly in my unit test assembly. Both projects share a solution. I am trying to test a method that transforms some XML based on a stylesheet I have in the main assembly. The xslt
2
1663
by: Scott Zabolotzky | last post by:
I've got an XML file that contains both a data section and a custom schema section. The data may represent only a subset of the parameters defined by the schema. I'm new to XSLT and I'm trying to figure out how to generate a tranform that will create an HTML form from the schema section and populate the controls with the values from the data section (if present). I _think_ I'd be able to come up with the transform to generate
12
10126
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b) ..... // xsl contents abc.aspx?p1=v1&amp;p2=<xsl:value-of select="$v2" />
3
2426
by: LionelAndJen | last post by:
I have an XML file that has a free form comment field in which the data provider, very kindly, already uses "&quot;" when writing "doesn't", I have doesn&apos;t . it's PERFECT, because that xml is then fed to an XSLT sheet that transforms this text into a sql insert statement. UNFORTUNATELY, XSLT translates doesn&apos;t into doesn't in the output, which then destroys my sql statement. How do I tell my XSLT to leave well-enough alone ? I...
0
9796
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10782
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...
1
10543
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
9323
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
7753
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
6951
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
5624
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
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3078
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.