Posix be like, “ok but suppose someone is developing an operating system which never has to process XML” 🙄
this might be the easiest portableish way of doing this and that is a condemnation of the current state of computing on Posix
here is a shell command you can run to test whether the value of MAYBE_NCNAME is an ncname or not; returns exit status 0 if it is and 1 otherwise
printf '%s\n' '<transform xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:exsldyn="http://exslt.org/dynamic" version="1.0"><param name="thing"/><template match="/"><choose><when test="/self::node()[translate(normalize-space($thing), " /([,*", "")=string($thing) and exsldyn:evaluate(concat("not(self::exsldyn:", $thing, ")"))]">ok</when><otherwise>ng</otherwise></choose></template></transform>' | xsltproc --stringparam thing "${MAYBE_NCNAME}" --html --novalid - /dev/null 2>/dev/null | grep -F -q -x 'ok'
/self::node()[translate(normalize-space($thing), ' /([,*', '')=string($thing) and exsldyn:evaluate(concat('not(self::exsldyn:', $thing, ')'))]
i think is safe
this probably actually needs a touch of hardening (making sure $thing does not contain a '[' or '/', or else you could run into serious issues) but
XSLT 1.0 + EXSLT is a constant exercise in things you probably weren’t intended to be able to do but nevertheless can
@aescling there's a bunch of virtual console on my wii u but i don't think it's that one
@aescling not in delaware
@aescling praying it comes to nintendo switch online i guess
@aescling @coriander anakin never really learns to see other people as people, but some people are His and he strongly feels the need to protect those ones, including Luke
his whole fall to the dark side is him either realizing people he thought were His aren’t actually, or him freaking out because there are people he thinks of as His but can’t protect. at the end of ep 6 he is like “this person is Mine and i CAN protect him (unlike padme/etc)” but this revelation does little to fix his fundamental problem of being a child slave who was forced to command an army of clone slaves as a teenager and prevented from ever learning how to see other people as people by his jedi training
@aescling @coriander yeah i mean fair read i think, but i do still think vader has an arc of giving up his own identity and becoming what the Emperor wanted him to be, and then in the end reasserting agency over his own choices
but that doesn’t make him a good person so much as it just means he stops being an utter tool
@Satsuma traditionally life was a lot cheaper and savings were less important
@Satsuma @wallhackio if clod boy doesn’t have salt he is a sod boy
Administrator / Public Relations for GlitchCat. Not actually glitchy, nor a cat. I wrote the rules for this instance.
“Constitutionally incapable of not going hard” — @aescling
“Fedi Cassandra” – @Satsuma
I HAVE EXPERIENCE IN THINGS. YOU CAN JUST @ ME.
I work for a library but I post about Zelda fanfiction.
For the time being, this is mostly a mirror of <https://status.ladys.computer/>. Want to get in touch? E·mail me!