This summer I will be doing web design for a jeweler.
I was thinking of using XML to keep track of the products/prices/info. Say the XML file looked like this. (I don't know the XML syntax yet, this is just a sample!).
<item>
<productid>001</productid>
<name>Product Name</name>
<price>Price</price>
</item>
Do you think XML would be work well for this project? If I don't use XML, I would just be using HTML and doing a page for each product, as I dont need a full blown database.
And how would I take that XML file, and transform it into this?
Product ID:001
Name: Product Name
Price: Price
Would I use XSL to parse/display the data?
BTW I don't need like, exact code on how to do this, just someone to point me in the right direction so I can learn this.
I have already started looking at the W3Schools tutorials on XML.
Thx in advance
Works both on IE and NS,and you don't have to worry about learning any other language ,such as xsl and stuff,just plain old JavaScript and DOM will do.
Thanks, Sounds great from that thread, but your site seems to be down
I have gone to other pages hosted on your server (im guessing that the IP is you running it yourself).
Ill try again a little later.
Originally posted by khalidali63 [J]ust plain old JavaScript and DOM will do.
Yes, but one in ten users do not use "plain old JavaScript and DOM" and that one in ten users includes persons with disabilities who cannot use "plain old JavaScript and DOM". As such that solution could cause the page to violate accessibility laws and certainly wouldn't be very nice. As this is to keep track of "products/prices/info" if this is in the US then Title III of the Americans with Disabilities Act would definitely apply and possible Title I as well. Just go ahead and learn XSLT. It's a pretty quick learn and rather useful.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Ok thanks! Looks pretty neat khalidali.
Although I read some tuts on XSLT and that may be the way to go if Charles is correct about those laws.
Charles-I have seen you post maybe a dozen times that something will not work for 1 in 10 users. I was wondering what exactly it was your referring to when you say that 1 in 10. Is it text only/aural browsers, or disabled javascript or something?
Originally posted by brendandonhue Ok thanks! Looks pretty neat khalidali.
........
As we all know,there are a tonnes of options out there when you look for coding,it all comes to the final point that what exactly suites your requirements.
XML/XSL an ultimate option without getting worried about any browser compliance problems...
JavaScript/XML is only an additional option for users,if charles has something against it why don't he sue MS,who to begin with created the XML data island idea and created a proprietery tag.
The solution I provided is only intended for people who deem this appropriate for them,for the others all the rest of the options are open for chosing.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
As we all know,there are a tonnes of options out there when you look for coding,it all comes to the final point that what exactly suites your requirements.
XML/XSL an ultimate option without getting worried about any browser compliance problems...
JavaScript/XML is only an additional option for users,if charles has something against it why don't he sue MS,who to begin with created the XML data island idea and created a proprietery tag.I thought I did a great job in creating a NS compatible code that works in IE as well,for those who like to use DOM methods to manipulate the xml with javascript.
The solution I provided is only intended for people who deem this appropriate for them,for the others all the rest of the options are open for chosing.
When you post some code or a method that is hurtful to people (and inaccessible pages do hurt the disabled) or that might expose the web author to lawsuits you at least have an obligation to warn them. "Do no harm" as it were. And perhaps you have an obligation to not post harmful code or methods at all but to promote better web practices.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
I don't think I am even of legal age to be working
Which country are you in? In the UK, you have to be 14 to work part time, for limited hours. I probably sometimes break the law, but I am working for myself, and as I'm under 18 I can't be sued. Isn't the law great.
I agree with Charles, you should not use Javascript for page content because it limits your audience, and is unfair (legal or not). Use JS for added interactivity, but the content should be available to everyone.
Adam
"If you’re not using valid HTML, then you haven’t created a Web page. You may have created something else, but it isn’t a Web page." - Joe Clark
If you follow the W3C Accessibility Guidelines I believe they say that if you do use Javascript, then make sure an identical page made without it is available.
I have two pages on my work site that use drop down menus and Javascript to make them link to other documents. It's the best solution in terms of space and presentation, what the client wanted. But I also have a message that comes up when Javascript isn't used offering a link to the same page, but with the menus turned into simple links.
I've just made the pages run from XML so I don't have to manually update two pages at once.
He guys, I've followed this thread, and I'd like to know what XSLT is, and how it provides a way to, not using Javascript (?), read and process XML documents and print them as HTML markup (am I right?). If I'm not mistaken, XSLT is XML "stylesheets," that provide a way for XML to be parsed... But the question is, how would I go about using it?
I hope to get into XML, because not only does it look really cool and interesting, but it also provides an efficient way for me to store, extract, and process data.
Jona
Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.
Bookmarks