www.webdeveloper.com
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 39

Thread: Basic XML Questions

  1. #16
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Okay, I've read up a whole bunch on XSLT and found a great link to some XSLT tutorials. Pretty clever...

    So I come to find out that XSLT is the "stylesheet" language of XML, and it basically sets the structure in which the data in the XML document is output...

    Now, Charles posted a link on the SAXON XSLT Parser... I wanted to know what this parser is needed for? I've created XML and XSLT documents on my local computer, so I know that it's "basically" client-side--but it has no compatibility issues! It's almost like creating your own template for a programming language! That's neat. No wonder it's called the eXtensible Markup Language.

    All right, so that's basically all I have to say for now... Give me your input, guys! I need it.


    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  2. #17
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    XSLT parsers read the xml and apply the xsl/xslt file format to it and produce the desired results.
    I think all of the XSL processors take to the most 3 parameters( at least the ones I worked with do)

    XSML file XSL file and OTPUT file

    All generation 6+ browsers(NS6+ and IE6+) have their built in xsl processor that transforms the xml document according to the xslt file.

    Be specific about your quetion..to get more insight on these issues..
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #18
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Well, ok, it makes sense now why I can use XSLT on IE6 and NS6. Are the two browsers' XSLT processors basically the same or is it like Javascript and back to compatibility issues? Also, for older browsers to support XML, I'd have to use an external XSLT processor like SAXON, right? So finally all I really have to do is use an XSLT processor (SAXON) for all browsers so that I don't have to worry about compatibility, right? I think I'm getting the general idea here... (Right? )

    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  4. #19
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    You can run XSLT three ways:

    1) at the browser

    2) at the server

    3) before you upload to the server.

    I use method three, using Saxon to generate a HTML version and often to generate a printer friendly Formatting Objects version which is then processed into PDF.
    “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

  5. #20
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    So then the question would be, is there any "best method"? What are the advantages and disadvantages of each method? Am I right in saying that the "at the browser," method has compatibility issues, the "at the server" method is the dynamic method and the "before uploaded" method is the static method? Are there any other advantages or disadvantages I'm missing?

    Thanks for helping guys, I've come across a few things and done a lot with at the browser XML (using IE, I haven't tested anything in NN or Moz yet). As much as creating my own DTD that reads the data and sets up a table with that data, and even adds up the sums. Very interesting how XML/XSLT works. I like it.


    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  6. #21
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    "At the browser" is still a little too iffy. Perhaps one day, but not yet. I don't process at the server because it would be too much of a hassle to get my server guy to get Java up and running. But if my documents were dynamic, then I'd go through the hassle.

    By the way, have you discovered the wonder of defining your own entities?
    “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

  7. #22
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Originally posted by Charles
    "At the browser" is still a little too iffy. Perhaps one day, but not yet.
    So you mean it's best to go server side for dynamic data?

    Originally posted by Charles
    I don't process at the server because it would be too much of a hassle to get my server guy to get Java up and running.
    Can't you use ASP, PHP, or CGI too?

    Originally posted by Charles
    By the way, have you discovered the wonder of defining your own entities?
    I think I have. What exactly do you mean by that?

    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  8. #23
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Originally posted by Jona
    So you mean it's best to go server side for dynamic data?
    Yes.
    Can't you use ASP, PHP, or CGI too?
    The XSL processors seem to be all written in Java.
    I think I have. What exactly do you mean by that?
    Here's an actual example from a technical document I've authored:

    <!DOCTYPE html SYSTEM "file:///Dtd/xhtml1-strict.dtd" [

    <!ENTITY AA '<acronym xml:lang="la" title="Amelanchier arborea &apos;Autumn Brilliance&apos;">AA</acronym> (Autumn Brilliance Downy Serviceberry)'>
    <!ENTITY AR '<acronym xml:lang="la" title="Acer rubrum &apos;October Glory&apos;">AR</acronym> (October Glory Red Maple)'>
    <!ENTITY FP '<acronym xml:lang="la" title="Fraxinus pennsylvanica &apos;Marshalls Seedless&apos;">FP</acronym>'>
    <!ENTITY KP '<acronym xml:lang="la" title="Kolreuteria paniculata">KP</acronym> (Golden Rain Tree)'>
    <!ENTITY PA '<acronym xml:lang="la" title="Picea abies">PA</acronym> (Norway Spruce)'>
    <!ENTITY PS '<acronym xml:lang="la" title="Pinus strobus">PS</acronym> (White Pine)'>
    <!ENTITY QPA '<acronym xml:lang="la" title="Quercus palustris">QPA</acronym> (Pin Oak)'>
    <!ENTITY QPH '<acronym xml:lang="la" title="Quercus phellos">QPH</acronym> (White Oak)'>
    <!ENTITY UPA '<acronym xml:lang="la" title="Ulmus Parvitolia &apos;Alee&apos;">UPA</acronym> (Alee Chinese Elm)'>
    <!ENTITY ZS '<acronym xml:lang="la" title="Zelokova serata &apos;Green Vase&apos;">ZS</acronym> (Green Vase Zelkova)'>

    <!ENTITY BD '<acronym xml:lang="la" title="Buddleia davidii &apos;Charming Pink&apos;">BD</acronym> (Butterfly Bush)'>
    <!ENTITY bd '<span xml:lang="la" title="Buddleia davidii &apos;Charming Pink&apos;">Buddleia</span>'>
    <!ENTITY HHR '<acronym xml:lang="la" title="Hemercallis &apos;Happy Returns&apos;">HHR</acronym> (Happy Returns Daylilies)'>
    <!ENTITY hhr '<span xml:lang="la" title="Hemercallis &apos;Happy Returns&apos;">Hemercallis</span>'>
    <!ENTITY LS '<acronym xml:lang="la" title="Lirope spicata">LA</acronym> (Creeping Lilyturf)'>
    <!ENTITY ls '<span xml:lang="la" title="Lirope spicata">Lirope</span>'>
    <!ENTITY NC '<acronym xml:lang="la" title="Narcissus &apos;Carlton&apos;">NC</acronym> (Carlton Daffidol)'>
    <!ENTITY nc '<span xml:lang="la" title="Narcissus &apos;Carlton&apos;">Narcissus</span>'>
    <!ENTITY PNH '<acronym xml:lang="la" title="Pennisetum &apos;Hameln&apos;">PNH</acronym> (Dwarf Fountain Grass)'>
    <!ENTITY pnh '<span xml:lang="la" title="Pennisetum &apos;Hameln&apos;">Pennisetum</span>'>
    <!ENTITY PL '<acronym xml:lang="la" title="Prunus laurocerasus &apos;Otto Lutyken&apos;">PL</acronym> (Cherry laurel)'>
    <!ENTITY pl '<span xml:lang="la" title="Prunus laurocerasus &apos;Otto Lutyken&apos;">Lauroceraus</span>'>

    <!ENTITY FRP '<acronym title="Fiberglass Reinforced Plastic">FRP</acronym>'>
    <!ENTITY OM '<acronym title="Operations and Maintaince">O&amp;M</acronym>'>
    <!ENTITY RP '<acronym title="Recreation and Parks">R&amp;P</acronym>'>
    <!ENTITY SWM '<acronym title="Storm Water Management">SWM</acronym>'>
    <!ENTITY ADA '<acronym title="Americans with Disabilities Act">ADA</acronym>'>

    <!ENTITY etc '<span xml:lang="la" title="and the rest">et cetera</span>'>
    ]>


    With that in the document prolog, I need only use &amp;PS; whenever I'm refering to a "pinus strobus" with its standard acronym PS and the dang thing will be properly marked up according to Web Content Accessibility Guidelines 1.0. (The document is for an entity covered by Title II of the ADA.)
    “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

  9. #24
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Yup, I have discovered them! In fact, I've used them. It's like creating your own DTD. Very neat!

    Originally posted by Charles
    Here's an actual example from a technical document I've authored
    You've written a book? Cool. May I ask where I may find this book? Also, I'd like to know how you learned Javascript and where from. Did you take it at college or a university?

    About the XSLT processors... I thought you could use PHP, ASP or CGI to process XML documents and sort them properly. If I'm not mistaken, that's a part of what this document is about (see brendandonhue's post above). Does this mean that server-side code (PHP, ASP or CGI) must create its own way of processing the XML to act like an XSLT processor, when in fact it is not an XSLT processor?


    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  10. #25
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    No, I haven't written any books lately, unless you count the way too many posts I've made on these fora. That DOCTYPE is from an internal document that details the stuff the contractor forgot to do when he built a public park.

    Another, more interesting project that I have going on is a little something that I worked up for a couple of local churches. The government might say that churches do not have to abide by the ADA, but we have to answer to a higher authority and that presents certain challenges where the congregational calendar is concerned. The final product must be accessible and somebody with limited computer skills has to be able to update it. So, I've created CalendarML and since church calendars have a lot of repetitive events, entities are really useful.

    XSLT can be thought of as simply another computer language, one with a specific application. You cannot use Perl as XSLT any more than you can use Perl as PHP. But in the same way that you can do the same things with Perl that you can do with PHP, you can use Perl to transform XML.
    “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

  11. #26
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Makes very good sense to me. Now that I know all this, I'm going to have to get that SAXON processor thing-a-ma-bob or whatever.

    Originally posted by Charles
    The government might say that churches do not have to abide by the ADA, but we have to answer to a higher authority and that presents certain challenges where the congregational calendar is concerned.
    I agree with you there, all the way.

    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  12. #27
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    “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

  13. #28
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Originally posted by Jona (me!)
    I'd like to know how you learned Javascript and where from. Did you take it at college or a university?
    May I ask why you haven't answered this question (now and in the past)? Are you avoiding answering?

    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  14. #29
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Originally posted by Jona
    May I ask why you haven't answered this question (now and in the past)? Are you avoiding answering?

    Jona
    I'm not so sure that I have learned JavaScript.

    I've never taken a class in programming and I'm not a programmer by trade. I just play with it the way some people do crossword puzzles. It's a diversion that doesn't take too much thought. I earned a BA majoring in Philosophy, which means that I'm trained to learn things and to see the world the way other people see it. The trick in using any computer languare is to see the world the way the language does. I read cover to cover JavaScript : The Definitive Guide by david Flanagan a few times and the rest is obvious.
    “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

  15. #30
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Well, in my opinion we've both basically learned Javascript (note: basically).

    I'm surprised you haven't taken any college courses or anything on it, but I'm not surprised that it's possible--seeing as that's exactly what I'm doing.

    Does JavaScript : The Definitive Guide teach the object.event() = function(){}, array-like, and object-oriented programming? Man, I need that book so bad.. OK, I'm off to buy a new hard drive, Photoshop, Flash, Dreamweaver, JavaScript : The Definitive Guide and a bunch of other stuff! lol


    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles