• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Online Tutorial

 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You know, it's been some time since I've really looked into XML but, some time ago, I did quite a bit of research and actually put together a bit of a tutorial on using XML. If anyone has the time and/or ambition to take a look at it, you can find it here. You'll need Macromedia Flash in order to use some of the examples (actually, I think just one), but the rest is mostly basic text.
I never really had many people take a look at it and tell me what they thought and I'd love to hear what all of you have to say about it. Granted, it's rather old and probably a bit naive, but I'd still love to get some feedback.
Thanks,
Corey
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good job, Corey !!!
I'm using IE 6.0.2600 and unfortunately, I got the message which says Your browser doesn't support XML.
Is there any other options that I need to configure?
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by YanNaing WTint:
Good job, Corey !!!
I'm using IE 6.0.2600 and unfortunately, I got the message which says Your browser doesn't support XML.
Is there any other options that I need to configure?


Unfortunately, like I said, the tutorial is rather old (as in IE6 wasn't out yet when I wrote it). Therefore, I was probably using JavaScript to check to see what version of browser you were using and, if it wasn't IE5 or Natscape 4.08, you got that error message. If you know much about XML, you can probably guess what that script is supposed to do, but that's something I'd like to fix, if I can ever find the time.
Thanks for checking it out,
Corey
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even i am getting the same message.
Also for the FlashCard application, it says "flashcard is null or not an object".
my browser is IE ver 6.00.2462.000
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nimesh Gala:
Even i am getting the same message.
Also for the FlashCard application, it says "flashcard is null or not an object".
my browser is IE ver 6.00.2462.000


I have attempted to fix the problem, but I don't have IE6 on the computer I'm at now so I have no way to test it.
You can try it again, if you'd like, but there are no guarantees.
Corey
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some of the same page links on page one don't go to the correct term in the glossary. I liked the glossary in the beginning. The two ‘here’ links on page 2 are broken (http://www.mediaforgeproductions.com/training/XML/booklist.xml). Your writing style is easy to read. The ‘root node’ link on page 2 does not put you at the glossary on page 1, or the correct term. I have IE 5.50 and the ‘run script’ button on page 3 still did not work(All I got was ‘error on page’ on the status line at the bottom of my browser). I really like the link on each line of code on page three to get more information on that line. I liked the ‘flash cards’ on XML terms. I did not try to build it using the instruction you gave I did not have time – sorry.
HTH
:roll:
 
YanNaing WTint
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Corey,
Don't be , I was just look through. Your tutorial is quite descriptive, concise and illustrative.
I just want to make sure that for everyone who wants to try out could follow your tutorial smoothly and I'm trying to referring yours.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, I'd like to thank everyone for your input about this tutorial. As I mentioned intially, I've never really had anyone look at this tutorial in much detail (hence the great number of broken links and what-not). Hopefully, I'll get a chance to go through the tutorial with a fine-tooth comb and track down those minor problems.
What I would like to ask for is that you give me back some feedback about the content of the tutorial. Is my information accurate. Are there parts that are especially confusing? Is there information that you feel that I've left out? I just feel that, having all of the knowledge available that you all have, I'm simply wasting your time if you're just looking for broken links.
I am, however, very grateful that so many of you have taken the time to look at the tutorial and give me some feedback. I look forward to as much of it as I can get.
Thanks again,
Corey
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Corey McGlone:
You know, it's been some time since I've really looked into XML but, some time ago, I did quite a bit of research and actually put together a bit of a tutorial on using XML. If anyone has the time and/or ambition to take a look at it, you can find it here. You'll need Macromedia Flash in order to use some of the examples (actually, I think just one), but the rest is mostly basic text.
I never really had many people take a look at it and tell me what they thought and I'd love to hear what all of you have to say about it. Granted, it's rather old and probably a bit naive, but I'd still love to get some feedback.
Thanks,
Corey

 
Frances Teng
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Corey:
I like your tutorial very much. I'm new to XML but I have all the background knowledge for learning it quickly. Your tutorial made it happen, my learning was easy, painless and enjoyable. I bought a book about XML but don't find time to go through the lengthy first chapter. I'm impressed you can illustrate the concepts so concise yet so easy for beginners to grasp. I would recommend it to my friends.
Here are a few fundamental things I think you missed, they are very minor and easy to make a right guess even without you covering them, however, it would be nice if you have them:
Are DTD tags, element names, etc case sensitive?
What extension name should be used when saving an DTD/XML (separate or together) file?
Is order significant in DTD (ATTLIST before ELEMENT or the other way around or does not matter)?
Syntax for <!DOCTYPE (you only have an example no official syntax.)
a List of valid data types for DTD. (You have #PCDATA for text, what are the other valid data types?).
Run this script button does not work.
I hope this would help.
Frances
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frances Teng:
Corey:
Are DTD tags, element names, etc case sensitive?
What extension name should be used when saving an DTD/XML (separate or together) file?
Is order significant in DTD (ATTLIST before ELEMENT or the other way around or does not matter)?
Syntax for <!DOCTYPE (you only have an example no official syntax.)
a List of valid data types for DTD. (You have #PCDATA for text, what are the other valid data types?).
Frances


Element and attribute names are indeed case sensitive.
The convention for XML and DTD files it to use these very extensions: .xml and .dtd. Nothing in the specification of either requires this.
Order is not significant in a DTD. However, readability is increased if you list things in a logical order, and put attribute declararations along with the elemenst they specialize.
Syntax for DOCTYPE is:
<!DOCTYPE inventory SYSTEM "DTD\inventory.dtd">
For a local DTD. Here <inventory> is the root element of the model being constrained.
If you are using a public DTD, then substitute PUBLIC for SYSTEM, and place the URI of the DTD in the quotes.
In terms of types, DTD is pretty thin. Attributes are essentially strings (there are entities, ID's and IDREF's, but they are all special case types). Element types are not defined in the global or local sense, but simply as the structures they specify.
Cardinality is also rather limited (* for unconstrained, ? for 0/1, + for 1 or more. Default is 1 and only 1).
HTH
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The convention for XML and DTD files it to use these very extensions: .xml and .dtd. Nothing in the specification of either requires this.


Scott,
Thanks for the help. A couple more quick questions for you. We had a brief discussion earlier about the use of an XML-Schema rather than a DTD. I've never seen an XML-Schema before, but I'd like to include a description of it in this tutorial, if possible. Can you direct me to a source so that I can find some information and hopefully an example or two?
Also, You mentioned that XML files are generally named with the extenstion .xml and DTD files with the extenstion .dtd. I have followed these guidelines in the past but, just to be sure, is an XML file with an included DTD still named with the .xml extension. I had always assumed that it was.
Also, with XML-Schemas, is it possible to have both local and remote schemas (just like DTD's)? If it is possible to have a remote XML-Schema file, what extension is put onto that file?
Thanks again,
Corey
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I bookmarked it Corey. Certainly user friendly
I still use IE5 so it worked well for me. I would like to learn XML, just haven't had the time lately. I never used Javascript before either.
Trying to gather IT work experience right now with a SCJP2 cert.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I still use IE5 so it worked well for me.


WooHoo! It worked for somebody, at least!
I really gotta fix that script...
[ January 16, 2002: Message edited by: Corey McGlone ]
 
Frances Teng
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott:
Thank you for answering my questions.
Corey:
I'm using IE5.5, your example in page 4 worked for me. I downloaded the zip file and added the xmlLoad.js in the directory. I also did my own by following the instructions. They both worked.
Thanks!
Frances
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frances Teng:
Scott:
Thank you for answering my questions.
Corey:
I'm using IE5.5, your example in page 4 worked for me. I downloaded the zip file and added the xmlLoad.js in the directory. I also did my own by following the instructions. They both worked.
Thanks!
Frances


Thanks for taking the time to check this out, Frances. Did you have any trouble building the application on your own? Was there anything that was unclear or left out? It's nice to hear that you got it up and running on your own.
Thanks again,
Corey
 
Scott Bain
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Corey McGlone:

Scott,
Thanks for the help. A couple more quick questions for you. We had a brief discussion earlier about the use of an XML-Schema rather than a DTD. I've never seen an XML-Schema before, but I'd like to include a description of it in this tutorial, if possible. Can you direct me to a source so that I can find some information and hopefully an example or two?
Also, You mentioned that XML files are generally named with the extenstion .xml and DTD files with the extenstion .dtd. I have followed these guidelines in the past but, just to be sure, is an XML file with an included DTD still named with the .xml extension. I had always assumed that it was.
Also, with XML-Schemas, is it possible to have both local and remote schemas (just like DTD's)? If it is possible to have a remote XML-Schema file, what extension is put onto that file?
Thanks again,
Corey


The XML-Schema primer at www.w3.org contains a purchase order example that I think is pretty good. Actually, the primer itself is really quite readable, which is not always the case with w3.org documents.
You can find it at
Schmea Primer
By "included DTD" do you mean a DOCTYPE reference to a DTD, or an actual embedded DTD? Either way, yes, an xml file will tend to use ".xml" as an extension, whether or not it refers to a constraint (dtd or xml-schema).
One can refer to a remote schema, yes. The xsi:schemaLocation attribute is used to point to a schema, either locally or at a remote URI.
Tangentially, xml-schema documents tend to use the extension "xsd" for "xml-schema definition". We often consider the schema document itself to be the "type" or "class" and the xml document being constrained as an "instance document".
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've done some updating to the tutorial and I think I've fixed a lot of the problems that people have found. At least, I hope so. Wouldn't you know it - the problem had nothing to do with the JavaScript, when I uploaded the JavaScript file, it was uploaded as XML3.JS and I was trying to import xml3.js. Picky, picky, huh? :roll: Anyway, I think it's working now, but I don't currently have IE6 installed, so I'd appreciate it if someone that does have it installed could go here and tell me if the "Run This Script!" works or not.
There was one question that Frances had asked me to clarify earlier and, even though Scott hit on it, I'm still unsure of exactly what he meant.
Frances said:


a List of valid data types for DTD. (You have #PCDATA for text, what are the other valid data types?)


and Scott replied with:


In terms of types, DTD is pretty thin. Attributes are essentially strings (there are entities, ID's and IDREF's, but they are all special case types). Element types are not defined in the global or local sense, but simply as the structures they specify.


Am I correct in interpreting this to say that the only real type available for an XML element or attribute is a String (or #PCDATA)? Is there anything else that an element or attribute could be (except for a set of other elements)? Are those the other "special cases" that you had mentioned, Scott? I thought I had seen somewhere that an element had been defined to contain CDATA, rather than PCDATA? Is that correct? What's the difference?
I'd just like to say thanks again to everyone that has taken the time to look at my tutorial. It had been so long since I had looked at it or someone had used it that I nearly had forgotten that I had written it.
Corey
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Corey, I took a very quick look at your site but didn't go through the tutorial (based on your good explanations of xml versus html in another thread, I assume your tutorial is well done ).
One very general comment on style: the links don't have underlines, but the unlinked headings do. Personally, I like how links without underlines look, but some style guidelines would recommend against it.(It's an accessability thing.)
Pauline
 
Scott Bain
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PCDATA (or, actually #PCDATA) is the type of data an element contains when it's not "empty". It stands for "Parsed Character Data".
CDATA, on the other hand, is an attribute type. It stands for "Character Data" and the main difference between it and #PCDATA is that it may not contain carriage returns, nor entities (a la < for the less-than sign). The parser does not, in other words, expand entities that are in an attribute value.
It's a bit confusing, yes, and it's a left-over from SGML.
To get more specific type checking than this (to check that an attribute is an integer, or conforms to a regular expression, etc...), you need to constrain with XML-Schema instead of DTD.
HTH
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Corey:
I successfully ran the script in IE6 and Netscape 6.1.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic