A Conversation for The H2G2 Programmers' Corner
XML
Alex 195614 As everyone else seems to like incredibly long names I keep mine ironically short. Started conversation Jul 2, 2002
I am looking into using xml can someone give me some advice as the content out there baffles me
XML
MaW Posted Jul 3, 2002
Okay...
a) what do you already know?
b) what do you want to use it for?
c) what system will you be developing on and what system are you targeting?
XML
Pastey Posted Jul 3, 2002
If you're looking into books, the best I've come across are by Wrox. We've got literally (no pun intended) thousands of pounds worth of books at work, but the Wrox ones are the only ones we really use.
XML
Dancer (put your advert here) Posted Jul 11, 2002
If you need a parser, there's Xerces, it's a great parser and it is bothe free and has both Java and C versions, so if you write in both, you use the same API with the parser.
Dancer
XML
Ion the Naysayer Posted Jul 18, 2002
XML isn't really a big stretch from HTML. If you use GuideML, you're already using XML and you probably didn't even know it .
I found the W3C's website ( http://www.w3.org/ ) both incredibly helpful and incredibly confusing. You may (or may not) find the actual XML 1.0 spec helpful. Watch out, it's big. I would highly recommend a visit to http://www.xml.com which is maintained by O'Reilly and Associates (the people behind those lovely computer books with the animals on the front - Perl has a Camel, for example). That's where I got started. Look up "Taming the XML Beast", which is the first understandable XML article I came across. You don't actually have to write DTDs but if you do you should keep in mind that DTDs are on their way out and XML Schemas are on their way in.
If you had a more specific question, I've been doing nothing but XML for the past three weeks at work. At first I thought . Then when I did a little more reading, it was more like . After I found out that XLink barely has support and XInclude doesn't have support at all, I was . But now XML is again because I got my Perl parser to work.
If you want to write basic, well-formed (actually XML), non-validated (you don't compare it to a list of allowable tags) XML, IE 5 and Mozilla 1.0 both have parsing support.
I'd also recommend a look into XSLT. There are XSLT articles by the writer behind "Taming the XML Beast" on xml.com as well. You need an external parser such as Dancer mentioned if you want to use XSLT, though. If you look on the W3C's website there should be a list somewhere () of software that implements XSLT.
Good luck! But don't worry, you probably won't need it.
XML
xyroth Posted Jul 18, 2002
hi.
does anyone here have a clue as to how you are supposed to seperate parameters in xlm?
the docs are not very clear, and it has come up in another thread.
acording to the xml spec, if you have to pass an "&" as a parameter seperator to a binary, you should replace "&" with "&", but it claims to be a recoding of html4 into xml, and that says something different.
The html4 spec says that you should stop using "&" as a seperator, and use ";" instead, which isn't mentioned at all in the xml spec except as a special character.
anyone know what the truth is?
XML
Ion the Naysayer Posted Jul 18, 2002
The following are excerped from the HTML 4.01 specification at http://www.w3.org/TR/1999/REC-html401-19991224/html40.txt
Forms submitted with this content type (form submission by use of the GET method, e.g. AddThread?inreplyto=2203831) must be encoded as follows:
1. Control names and values are escaped. Space characters are replaced by '+', and then reserved characters are escaped as described in [RFC1738], section 2.2: Non-alphanumeric characters are replaced by '%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks are represented as "CR LF" pairs (i.e., '%0D%0A').
2. The control names/values are listed in the order they appear in the document. The name is separated from the value by '=' and name/value pairs are separated from each other by '&'.
---
The other piece I found was right near the bottom of the specification and says:
We recommend that HTTP server implementors, and in particular, CGI implementors support the use of ";" in place of "&" to save authors the trouble of escaping "&" characters in this manner.
---
The latter is a recommendation. The former is a requirement. I'll test out the use of ; on my copy of Apache when I get the chance.
XML
xyroth Posted Jul 19, 2002
interestingly, mark told me that h2g2 already supports the use of ; instead of &, so the question then is why don't they make & the default?
by the way, I tested, and it does work.
XML
Dancer (put your advert here) Posted Jul 23, 2002
Like meny things in computing, the answer "Historical reasons" applies here too.
Actually, the "correct" way to do things is with & but people are too lazy to do things correctly.
Dancer
Key: Complain about this post
XML
- 1: Alex 195614 As everyone else seems to like incredibly long names I keep mine ironically short. (Jul 2, 2002)
- 2: MaW (Jul 3, 2002)
- 3: Pastey (Jul 3, 2002)
- 4: Dancer (put your advert here) (Jul 11, 2002)
- 5: Ion the Naysayer (Jul 18, 2002)
- 6: xyroth (Jul 18, 2002)
- 7: Ion the Naysayer (Jul 18, 2002)
- 8: xyroth (Jul 19, 2002)
- 9: Dancer (put your advert here) (Jul 23, 2002)
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."