-
Jeybe
To check supported xeps on a specific server one needs to be logged in, correct?
-
flow
Jeybe, depends, simply querying the disco#info of the server's address may already reveal most XEPs
-
flow
but obviously not the ones that are only exposed to users of this service
-
Jeybe
To mention, I'm completely new to XMPP development (and so the conrecte XMPP and XEP specs) and mostly new to development in general. The XEPs I'd like to check are the ones from the Compliance Suite
-
flow
Jeybe, well you could simply get the source code of the compliance checker and look how the checker does it
-
Ge0rG
Jeybe: some relevant features like Push and MAM are probably only visible on your own account JID, not on the server JID
-
Ge0rG
so yes, you need to have an account
-
Jeybe
Ok thx
-
Jeybe
Makes sense, as for the tester on compliance.conversations.im also needs account credentials
-
Ge0rG
the code behind is https://github.com/iNPUTmice/caas
-
flow
thats why I am in favor of stuffing those features also in the disco#info response of the service's address: you don't need to have an account to check how widespread an xep/feature is implemented
-
pep.
left: `"<root xmlns=\"root_ns\" a=\"b\" xml:lang=\"en\">meow<child c=\"d\"/><child xmlns:ns0=\"child_ns\" d=\"e\" xml:lang=\"fr\"/>nya</root>"` right: `"<root xmlns=\"root_ns\" a=\"b\" xml:lang=\"en\">meow<child c=\"d\"/><child xmlns=\"child_ns\" d=\"e\" xml:lang=\"fr\"/>nya</root>"`'
-
pep.
People doing xml properly in their stack, what version would use the less bytes in the general case?
-
pep.
Here for sure it's the right one, but in XMPP it's quite common to reuse jabber:client right
-
pep.
So I'd rather not shadow it
-
flow
to
-
flow
many
-
flow
quotes
-
pep.
yeah sorry, that's the output of my tests :)
-
flow
pep this is about XML serialization, right?
-
pep.
yes
-
flow
I think I would simply use the prefix if it already exists, otherwise not
-
pep.
left: `#"<root xmlns="root_ns" a="b" xml:lang="en">meow<child c="d"/><child xmlns:ns0="child_ns" d="e" xml:lang="fr"/>nya</root>"#` right: `#"<root xmlns="root_ns" a="b" xml:lang="en">meow<child c="d"/><child xmlns="child_ns" d="e" xml:lang="fr"/>nya</root>"#`'
-
pep.
here, without the escaping
-
pep.
flow, not what I'm asking
-
pep.
or maybe with this you mean I shouldn't shadow
-
pep.
and prefer the left version
-
flow
where is something shadowed in the left/right examples you showed?
-
pep.
In the right example the child xmlns shadows root's
-
pep.
the second child
-
pep.
Which means if this child has descendants, I won't be able to reuse root's ns without redeclaring it
-
flow
right
-
flow
but in xmpp we tend to not re-use jabber:client once an extension element namespace has been declared
-
flow
<forwarded/> being one prominent exception
-
Link Mauve
An exception would be forwarded or MIX.
-
flow
ahh MIX, really?
-
Link Mauve
MIX-PRESENCE IIRC.
-
flow
cause its in pubsub potentially
-
flow
anyway, I am not sure what you are asking, or if there is a generic answer to your question
-
Link Mauve
Presence in PubSub! \o/ <items node='urn:xmpp:mix:nodes:presence'> <item id='123456#coven@mix.shakespeare.example/UUID-x4r/2491'> <presence xmlns='jabber:client'> <mix xmlns='urn:xmpp:presence:0'> <jid>hecate@shakespeare.example/UUID-x4r/2491</jid> <nick>thirdwitch</jid> </mix> <show>dnd</show> <status>Making a Brew</status> </presence> </item> </items>
-
flow
but if your codebase is so far feature complete that you think about saving bytes… ;)
-
pep.
flow, no I'm just curious, I have to make a choice :P
-
Link Mauve
pep., what I’d do would be to let the user declare the prefixes they want on the root <stream:stream>, if XEP-0044 negociated it’s allowed, and only use prefixed elements if their namespace has been defined there.
-
pep.
My implementation does left at the moment
-
pep.
But our tests do right
-
flow
pep: smack would (potentially) prefix presence in this case
-
flow
with the rule I mentioned before
-
pep.
let me test on real data
-
pep.
Link Mauve, minidom doesn't have the knowledge of "stream header" or not
-
Link Mauve
pep., yeah, so it should be handled at another layer, which is why I said “let the user”.
-
pep.
Sure, with the new API I let the user define custom prefixes
-
pep.
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"><message><body/><replace xmlns:ns0="urn:xmpp:message-correct:0"/></message></stream:stream>
-
pep.
hmm, ns0 is indeed useless here.
-
pep.
And message and body just reuse the default ns
-
pep.
wait, this is not valid. it should be ns0:replace