-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds AboutXml topic #301
Adds AboutXml topic #301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1st pass! Only got about halfway through, but hopefully some of this is helpful! 😁
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor stuff for the second half, by the looks of it.
Otherwise looks quite solid, nice work. Thanks! 😊
The URI used for a namespace is often made-up, it does not have to exist on the Internet. The namespace | ||
must be unique within the document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird. Is there a history behind this I can read up on? Seems odd to use a URI if that won't really exist most of the time. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can find similar statements around. It's not used by the parser (except as a unique value), so you can just make it up and XML parsers will accept it as valid.
For instance, take a MAML document. It has many, many, many namespaces. Picking the first from base.xsd, it looks perfectly valid:
https://schemas.microsoft.com/maml/2004/10
And it may even have worked at one time. It doesn't any more though. Nothing will care, all of the schema files are locally available at the end of the day.
XML documents may declare more than one namespace. Additional namespaces are declared with a prefix. | ||
|
||
<root xmlns="http://someuri/default.xsd" xmlns:prefix="http://someuri/prefix.xsd"> | ||
... | ||
</root> | ||
|
||
The prefix name is arbitrary but must be consistent within a document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the common usage for additional namespaces in the one doc? Seems like an odd thing to have for XML. O.o
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code / schema reuse most often I suppose. Never had to design and XML schema so I don't really know to be honest :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to push a Group Policy document in there as an example. They're "wonderful" for massive use of namespaces. Decided against it though, difficult to make it actually useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be an interesting thing to pursue for a kata 😉
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me on the whole.
@steviecoaster did you want to give this one a quick pass?
PR Summary
Fixes #255
Context
Adds koans which explore working with XML
Changes
Adds AboutKoans topic.
Checklist