norden.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Moin! Dies ist die Mastodon-Instanz für Nordlichter, Schnacker und alles dazwischen. Folge dem Leuchtturm.

Administered by:

Server stats:

3.4K
active users

#xml

3 posts3 participants1 post today

Vytvořil jsem novou #PHP knihovnu určenou k deserializaci #XML z STORMWARE s.r.o. #Pohoda do PHP Tříd.

Jakmile knihovnova stráví vstupní xml soubor z pohody vytvoří z něj objekt který obsahuje metody potřebné pro práci s daty. Například součet položek fakury ve zvýšené sazbě dph získáme voláním

```$invoice->getInvoiceSummary()->getHomeCurrency()->getPriceHighSum()```

A jako třešinka na dortu je možnost po změně hodnot v objektu tento zase vyexportovat (zeserializovat) jako XML

Knihovna vznikla pro účelu právě se rodícího nástroje "pohoda-realpad" o kterém zase někdy příště.

Zdrojové kódy jako obvykle jsou plně k dispozici na GitHubu

github.com/VitexSoftware/pohod

Stormware's Pohoda XML/PHP serialization. Contribute to VitexSoftware/pohodaser development by creating an account on GitHub.
GitHubGitHub - VitexSoftware/pohodaser: Stormware's Pohoda XML/PHP serializationStormware's Pohoda XML/PHP serialization. Contribute to VitexSoftware/pohodaser development by creating an account on GitHub.

Sonderzeichen, #ZUGFeRD #LaTeX und #XML, aaargh! Warum haben ausgerechnet Firmennamen ein typisches Sonderzeichen, das in sed, LaTeX und XML jeweils escaped werden muss, und zwar unterschiedlich?

sed …
-e "s/FIRMA/${FIRMA/&/\\\\\\&}/g"
-e "s/XMLFIRMXML/${FIRMA/&/\\&}/g"

Der obere SED-Befehl ist für die Text-Anschrift im LaTeX, das untere für das XML. Der \\ ist NUR für das Escapen des & im SED.

Jetzt muss ich noch rausbekommen, wie ich die Expansion von ß in "\T1\ss " bei der Ausgabe von XML vermeide, dann ist es für Deutschland einsatzbereit (die anderen Umlaute gehen. Blöd, dass fast jede nicht abgekürzte Adresse in Deutschland ein ß enthält).

I have been doing #XML stuff this week, specifically #TEI. I know a lot of people don't really like #XSLT, but it reminded me that when you're working with something that's not just structured data but a stream of text where some or all of the markup is part of the flow then that hybrid imperative/declarative model works really well for representing the full range of transformations you might want to make.

Would be interested to know if there are good modern alternatives.

Does anyone happen to have a copy of:

Floyd, Michael. A Conversation with Charles F. Goldfarb. Web Techniques (Vol.3, Issue 11), pp.38–41, November, 1998

It used to be online, but has now disappeared, and the Internet Archive doesn’t have it either. I’d like to check a quote that I copied back then.

Continued thread

I hadn't heard of it before, but it turns out there's a style format called XSLT that allows the browser to translate an XML file into HTML with CSS styling for display purposes.

Since my feed is Atom rather than RSS, I had a bit of trouble, but this post was helpful:

andrewstiefel.com/style-atom-x

Andrew Stiefel · How to Style an Atom Feed with XSLT
More from Andrew Stiefel
#RSS#Atom#XML

I figured out how to get my RSS feed to be human-readable and nice-looking!

I'd been wanting to do this to give people who aren't familiar with RSS an easier on-ramp to the stuff I care about.

I figure if someone new to RSS clicks on the link and just gets raw XML, they might think something is “broken” and not stick around, but now there's something human-readable and with instructions on how to follow it in a reader.

reillyspitzfaden.com/feed.xml

#RSS#Atom#XML