www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: XSLT--Was it ever used?

  1. #1
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728

    XSLT--Was it ever used?

    Well, aside from the webcomic in my signature.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,427
    I never used it except to play around with it a bit and think, "That's nice. I wonder if I'll ever have any real reason to use it?"

    But then, I hate XML: JSON all the way!
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728
    I just got pissed off at a hacked MySQL server, which is why I redid the webcomic. Maybe it's time to change it back--or just go with straight HTML.

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,427
    Maybe Mongo or Solr?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728
    Never heard of either of those.

  6. #6
    Unknown to me..Thanks

  7. #7
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,427
    Quote Originally Posted by Mr Initial Man View Post
    Never heard of either of those.
    So-called "no-sql" solutions optimized for search speed at the cost of flexibility (the data files are built to support specific, expected searches). If you're not expecting a huge data set (for some undefined value of "huge"), probably not necessary unless you just want to play with something different.

    PS: Oh, and don't forget SQLite for a RDBMS that does not require you install/use a separate, stand-alone database server.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  8. #8
    Join Date
    May 2014
    Posts
    1,085
    XML Transforms -- in most all their uses -- much like XML as a database format is just a bloated wreck and disastrously bad idea. Human legible formats like XML are GREAT for data interchange BETWEEN database formats, but absolutely dreadfully inefficient when it comes to actual data procession.

    ... and no matter what the die-hard "XML for everything" nutters claim, XML exists to be a human legible format, NOT a machine readable one. I don't know where the blue blazes they got the idea that using plain english words in a markup style format is 'machine readable', but it shows that they don't know enough about 'machines' to be opening their traps on the subject. Are the integers and floats stored in bitpacked formats? Are the strings stored as RLL or null-terminated? No? THEN IT'S NOT MACHINE READABLE! (literally my right hand swings up ready to deliver a pimp slap every time a XML nutjob opens their yap on this subject).

    Much like the now defunct XHTML 1.1/newer, XSLT was a bad idea put together by people who don't know enough about computers to be making 'standards' for them -- though admittedly I say the same thing about a LOT of recent technologies. They're all grossly inefficient, needlessly complicated, and actually make MORE work than older simpler formats... which is why I put JSON in the same category as XML for most data throughput...

    But again, I'm the creepy bastard who's still using ASCII control codes or CSV for data transmission. Don't know why we need all the goofy complex crap like JSON and XML when we have perfectly good character codes for start of heading, start of text, end of text, end of medium, file separator, group separatior, record separator, unit separator... That thanks to every major character encoding being backwards compatible to ASCII7 work JUST FINE to this day.

    Hell, the only time you should need to be passing field names is if you don't know the field names -- something that shouldn't be happening in the first place.

    Oh, and mySQL got hacked? Lemme guess, still using mysql_ functions with no sanitation? .. and don't go completely back to flat HTML, just use PHP to glue parts together and leverage the filesystem, no SQL needed.

    I'm increasingly starting to think that when it comes to databases, we're overusing them now for things where it's a total waste of code and time. Users, massive organized posts? Fine, makes sense... Static content on a site? Not so much.
    Java is to JavaScript as Ham is to Hamburger.

  9. #9
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728
    Quote Originally Posted by deathshadow View Post
    XML Transforms -- in most all their uses -- much like XML as a database format is just a bloated wreck and disastrously bad idea. Human legible formats like XML are GREAT for data interchange BETWEEN database formats, but absolutely dreadfully inefficient when it comes to actual data procession.
    Hmmm... could that be why my website take a second to show its text? Naaaaaaaaaaaaah, opening half a dozen XML files can't be the reason. 'Tis balderdash, bunkum, and billigswoggle.

    *Checks out Coach Random webpage, realizes that the link is YEARS out of date. Whoops.*

    But then again, I'm the same guy that had THIS for a root element start tag:

    Code:
    <xsl:stylesheet
    	version="2.0"
    	xmlns="http://www.w3.org/1999/xhtml"
    	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    	xmlns:D2RI="http://www.mrinitialman.com/Coding/XML_Pages/D2Runes/"
    	xmlns:D2Rn="http://www.mrinitialman.com/Coding/XML_Pages/D2Runes/Runes/all_runes.xml"
    	xmlns:D2RW="http://www.mrinitialman.com/Coding/XML_Pages/D2Runes/Words/"
    	xmlns:D2WR="http://www.mrinitialman.com/Coding/XML_Pages/D2Runes/WordRunes/"
    	xmlns:D2Crft="http://www.mrinitialman.com/Coding/XML_Pages/D2Runes/Crafted/"
    >

  10. #10
    Join Date
    May 2014
    Posts
    1,085
    The XML prolog putting IE into quirks can't be helping much either

    NOT that FF doesn't have a quirks mode too, despite what a lot of dev's claim:
    https://developer.mozilla.org/en-US/..._Mode_Behavior

    Or the endless ID on everything and oddball use of numbered headings...
    Last edited by deathshadow; 06-15-2014 at 04:32 AM.
    Java is to JavaScript as Ham is to Hamburger.

  11. #11
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728
    Oddball use of numbered headings?

    *Owns up to using the ID attribute a lot.*


    Oh, and when you say "static content on a site"--What if it's a HUGE webpage? (It's built from PHP+MySQL)

    Oh, and before you make mention of it, class names such as 'class="DigoToggle DigoWingsBat DigoWingsButterfly DigoWingsClassic DigoWingsTricolour DigoWingsZZType Furre1GenSelectTriggering FurreAction ZZOtherAnystuff "' ARE required for this page to work.
    Last edited by Mr Initial Man; 06-15-2014 at 05:39 AM.

  12. #12
    Join Date
    May 2014
    Posts
    1,085
    Quote Originally Posted by Mr Initial Man View Post
    Oddball use of numbered headings?
    H1's are the heading under which all content of the page is subsections. H2 means the start of a subsection of the H1 preceding it, H3 is the start of a subsection of the H2 before it.

    Did you REALLY mean to say on this page:
    http://coachrandom.zzl.org/

    That "The Strips", "Random Stuff" and "History" are subsections of "August 29, 2001 - April 23, 2004"? I kinda doubt it.

    Quote Originally Posted by Mr Initial Man View Post
    Oh, and when you say "static content on a site"--What if it's a HUGE webpage? (It's built from PHP+MySQL)
    How often is the content changed and updated? IS new content added all the time?

    It might be more efficient to put that into simple arrays in a static include, than waste the overhead of a database on something that is not queried for anything more than "SELECT *"

    ... unless you're actually doing something more than what I'm seeing.

    Quote Originally Posted by Mr Initial Man View Post
    Oh, and before you make mention of it, class names such as 'class="DigoToggle DigoWingsBat DigoWingsButterfly DigoWingsClassic DigoWingsTricolour DigoWingsZZType Furre1GenSelectTriggering FurreAction ZZOtherAnystuff "' ARE required for this page to work.
    Extremely unlikely.

    ... but then 325k of markup for 134k of plaintext is usually a pretty good indication there's something awry with the markup; like endless pointless classes and ID's for nothing.
    Java is to JavaScript as Ham is to Hamburger.

  13. #13
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728
    Quote Originally Posted by deathshadow View Post
    H1'How often is the content changed and updated? IS new content added all the time?

    It might be more efficient to put that into simple arrays in a static include, than waste the overhead of a database on something that is not queried for anything more than "SELECT *"

    ... unless you're actually doing something more than what I'm seeing.
    It's not updated ALL the time, but it is updated whenever the online game Furcadia is updated and adds more lines. I suppose I could recreate the page from PHP+MySQL and reupload a flat HTML page every time Furcadia updates.


    Quote Originally Posted by deathshadow View Post
    ... but then 325k of markup for 134k of plaintext is usually a pretty good indication there's something awry with the markup; like endless pointless classes and ID's for nothing.
    Did you just look at the code or see what the page actually does? True, the classes and ID attributes don't usually work with CSS, BUT...

    They're not there for CSS. They're there for JavaScript. Remember when I mentioned there were a few pages I created where the very PAGE was pointless without JavaScript? This is the largest of them. It's basically a search tool for DragonSpeak command lines (DragonSpeak is Furcadia's scripting langauge).

    The IDs used with the checkbox inputs identify each criteria (and there's a hierarchy, thus the cumulative ID names. For example:
    "DigoWingsButterfly" DigoWingsButterfly mean it's a Digo (a purchasable extra), DigoWingsButterfly means that this particular digo is of the Wing variety, and the whole thing means that they're butterfly wings.

    The JavaScript will match any table row with the class name "DigoWingsButterfly" with the checkbox with ID="Digo" ("Digos in General"), ID="DigoWings" ("Wings") and , of course, ID="DigoWingsButterfly" ("Butterfly wings").



    Oh, and the commands 'class="DigoToggle DigoWingsBat DigoWingsButterfly DigoWingsClassic DigoWingsTricolour DigoWingsZZType Furre1GenSelectTriggering FurreAction ZZOtherAnystuff ' is used for?

    • (0:274) When a furre turns on any wings,
    • (0:374) When a furre turns off any wings,


    Gotta catch 'em all.

    Well, I suppose I could have gone with an AXIS or HEADERS attribute on a table header or table cell, but the end result would have been just as lengthy.


    I invite you to poke around the page, see how the page works, and let me know how you would have done it. At least the people it was meant for (that being people working with DragonSpeak) liked it.
    Last edited by Mr Initial Man; 06-15-2014 at 08:31 PM.

  14. #14
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,728
    Oh, and one other thing.

    Quote Originally Posted by deathshadow View Post
    Oh, and mySQL got hacked? Lemme guess, still using mysql_ functions with no sanitation? .. and don't go completely back to flat HTML, just use PHP to glue parts together and leverage the filesystem, no SQL needed.
    Site predates my learning of mysqli (goes back to 2007 at least), and only integers between 1-361 could be passed to the database, so there WAS input sanitation.


    EDIT: *Goes over code* Hmmm... I suppose I could go over the attribute tabs, strip out the ID attributes as well those in the fieldsets, and just use JavaScript to tie them together in the sequence in which they appear. Hmmm...
    Last edited by Mr Initial Man; 06-16-2014 at 02:17 AM.

  15. #15
    Join Date
    May 2014
    Posts
    1,085
    Quote Originally Posted by Mr Initial Man View Post
    I invite you to poke around the page, see how the page works, and let me know how you would have done it.
    Looking at it, there's two different ways I'd have approached it.

    First, would be the 'accessible' way, which would mean multiple page-loads and most of what you are doing being handled server-side, not client side. Frankly, I'd never build a single page that size in the first place; waste of bandwidth if the end user doesn't visit all the options. NORMALLY this would be what I'd advocate as a page SHOULD be made to work -- without scripting -- LONG before you EVER think about adding JS to a page.

    That said, you've built an application, not a website -- and there is a difference.

    That difference leads to my second approach; since none of your elements on the page are the least bit useful when scripting is disabled, I'd have generated 99%+ of your markup... from the script. Quite literally between your <body> and </body> If I was writing that page, the content would probably have looked like this:

    Code:
    </head><body>
    
    <h1>
    	The Cross-Referenced Catalogue Of DragonSpeak Lines
    </h1>
    
    <noscript>
    	<h2>Error, this page requires JavaScript to function.</h2>
    	<p>
    		Please enable JavaScript, or use a browser capable of using it.
    	</p>
    </noscript>
    
    <script type="text/javascript" src="dragonSpeak.js"></script>
    
    </body></html>
    EVERYTHING else on that page generated from the script. It would be far, FAR less code, and properly gracefully degrade. It would also mean you could store hooks to the generated elements (preferably built with DOM methods) in objects and arrays so you don't need any of those classes. That would speed up the page's responsiveness since you wouldn't have any getElementByxxx in there either.

    Oh, and that 'view' popup has to be the most annoying thing ever. I'd try to find some alternative to that. Maybe at least modernize/center it with a lightbox type effect since it's current behavior results in buggy/broken/hard to use scrolling.

    Really though a LOT of the data in there I'd be loading via AJAX; there's no point in sending client-side data they aren't actually viewing.
    Java is to JavaScript as Ham is to Hamburger.

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