Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 395 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a point creating a site using XSLT

#11
Back in 2002-2003 I did a lot with XSLT (and some more in 2006-2007). Your mileage on this will vary but honestly I would avoid it, for several reasons:

- The syntax is a blinding headspin, hard to learn, hard to get right and just plain gives you a headache. The templates themselves aren't too bad but throw in some gnarly XPath expressions and it just hurts;
- For reasonably sized documents and transforms it is relatively slow. Whether or not it's slow enough to be relevant to you is something you'll only find with benchmarking your scenario so don't take this as a blanket rule, more of a cautionary tale or a caveat;
- Error messages just aren't that useful and it can be hard to figure out problems. Unlike a more traditional approach, you can't whip out a debugger and step through an XSLT;
- Generating HTML with any modern Web-flavoured language (C#, Java, PHP, Python, Ruby, etc) is trivial, straightforward, easy to log and easy to debug;
- Manipulating XML is arguably more tedious and produces more code that directly manipulating objects and converting them into markup. This of course will vary by what tools your chosen language provides you with.

The only place I can really see having an application for XSLT these days is in consuming Web services that produce XML (lots produce JSON and more easily consumed formats these days).

And even in that case I'd probably still manipulate the XML directly with, say, JAXB in Java (or similar technologies in other languages).

**Update:** I just came across [The Death of XSLT in Web Frameworks][1]. For example:

> For example: how to hide the row in
> table (using different CSS style),
> based on some CONDITION, with XSLT?
> See:
>
> <tr>
> <xsl:attribute name="style">
> <xsl:choose>
> <xsl:when test="CONDITION">
> <xsl:value-of select="'visibility: visible'">
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="'visibility: collapse'">
> </xsl:otherwise>
> </xsl:choose>
> </xsl:attribute>
> ...
> </tr>
>
> and now the same with JSP 1.x:
>
> <tr style='visibility:<%=CONDITION ? "collapse" : "visible"%>'>
> ...
> </tr>
>
> or with JSP 2.x:
>
> <tr style='visibility:${CONDITION ? "collapse" : "visible"}'>
> ...
> </tr>

summarized by:

> So if you start new project, think twice (or ten times) before jumping into XSLT. And > if you use Eclipse, you can even think twice before using JSP/JSTL. Velocity or > FreeMarker might be a better option.

[1]:

[To see links please register here]



Reply

#12
As a side note, [wowarmory.com][1] is a good example of a high traffic site that uses XSLT. In fact, I think the whole site uses it.


[1]:

[To see links please register here]

Reply

#13

xslt is hard?

It's a programmers job to tackle complex problems and complex standards. There's stuff that is way harder and still needed. Just keep going at it and get's easier each time you need to learn new stuff.

Xslt is easy.

Really! There are good books out there that teach you xslt. Just learn e.g. rdf/owl (a w3c standard) and it can still get much more complex...


xslt is slow? Just use the right caching if you can. (ok, its not always possible...).


Just read about REST (some book or Roy Fielding dissertation) that's essential stuff too.

Now with XProc (xslt piplines) and a small restserver around calabash (Xproc implementaion) you can archive so much. it can definitly save you time. any data can be exportet to XML, made aviliable via REST and transformed with XProc.

Reply

#14
[Symphony CMS][1] uses XSLT. While using that CMS I found that the only real problems I had were to do with learning the XSL/XPath syntax, mostly due to a lack of good tutorials/documentation. Might be worth giving Symphony a try if you want to see some relatively modern XSLT usage.


[1]:

[To see links please register here]

Reply

#15
If your platform is ASP.NET check out [myxsl][1]

XSLT gives you the ability to do unobtrusive templating, which is IMO the ultimate kind of templating.

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through