Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
hjk10156964y@3rdWorldPoison for selection yes. Like css selectors. It's the part that is comparable and sometimes used interchangeably.
-
XML itself is way too verbose even for a schema-less encoding. If you already have a schema, structure descriptions should occupy 1 byte per variable-length element and 1 byte per optional element per message. Maybe a bit more if your encoding can do funny things, but definitely not as much as XML. In comparison, JSON is relatively low price for readability.
-
So XSLT still is a thing?
Fifteen years ago, when i saw a single specimen, most already believed it to be extinct in the wild... -
i actually kinda liked it when i discovered it, moreover at the time when i got probably the only project where using it seemed to make sense:
get xml data from a service, xslt it into a html page presenting it in a nice way.
it was cool, while i was being ot that single project ever where using it made sense. -
I wish there was better support for XSLT in C++. The libraries that exist are all C if I remember correctly. I like XSLT because I can convert a document to another representation by changing just the XSLT. I did this in a project 2 years ago. We were originally writing straight HTML. However, we changed to a really crappy HTML rendering engine. So I did the output in XML. Then before presentation I convert to the crappy HTML with XSLT. At some point I will redefine the XSLT and output another format altogether. Because it is in an intermediate format I can output the same XML to JSON for instance. If we have a need.
Best XML/XSLT library I ever used: lxml for Python. -
I actually used it once to generate HTML and PDF from xml-serialized objects. Was quite handy. Though it is veeery old and finding good documentation seems almost impossible.
-
@hjk101 Err, no. XSLT is a way to show formatting for XML documents. Just like CSS. Just a lot less featureful.
Xpath is just an addressing mechanism, as @3rdWorldPoison stated. -
@junon XSLT is a way to 'show formatting' for XML documents? What does 'show formatting' mean in this context? It transforms documents and is turing complete. It does not produce XML unless you tell it to.
-
@Demolishun CSS is turing complete as well. Being "turing complete" is an incredibly low bar, by the way. I don't see how it has anything to do with CSS vs XSLT, either.
XSLT just transforms XML, usually for display purposes. It formats XML data in whatever target medium you want. That's why XSLT documents are called "stylesheets". It serves the same purpose as CSS, even though CSS is a bit less generic than XSLT. -
hjk10156964y@junon The T of transformations makes it something different than a view/display adaptation as CSS does in my opinion. There a of course similarities amoung them the selecting/addressing of elements but CSS has no power over the data and structure.
-
@hjk101 CSS has power over the data with `content` and I'm not sure what you mean by 'structure' here.
Also, it doesn't matter. XSLT was invented primarily for displaying XML in other media/presentations. We can argue semantics all day; there's not much else to argue over, however. -
@junon I think he means that the xslt transformation can produce anything. Hence the structure. The output is not xml unless you define it to be xml. CSS doesn't change the fact that html is still html. I think you mean it affects the presentation in a similar way for both technologies.
-
@Demolishun XSLT doesn't change the original data either. You need XML + XSLT -> output.
Again, we're arguing semantics here, which is pointless. -
@junon It is perfectly valid for an xslt transformation to change the data, or even not output anything. So it very much can change the data.
-
hjk10156964y@Demolishun You are completely right one worked for a company where you can upload docx and odt files XSLT is used for processing it into the required data structure. It's you would diff the original XML with the output you would get back almost every line changed.
Even CSS content does not do anything with the DOM it's a real time display only thing. Perhaps there is an CSS processor implementation out there that actually transforms html but I have never seen it. Have seen quite some XSLT implementations used as filter, fixer (for Adobe InDesign crappy output) and plain text/PDF converter.
In fact I've never used it seen it used just displaying stuff differently (without storing the altered output).
Related Rants
-
InvisibleMe21"Pythonists don't comment, they write readable code." Yea, tell that to the list comprehension with three lam...
-
ddash1237The best motivation to quit Image Classification... x_x
-
NoMad8Assembly... Do I really need to say more? Okay, it's low level so there is no abstraction. All you deal with ...
There’s just no love for XSLT. Some people tell me it’s not even a language.
rant
wk239