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
Permit XML definition of white space #39
Comments
If you are using .NET Framework, then over there might have been the better place. :-) - The issue itself most probably applies to the Java version as well, so all is fine, I just wanted to make sure you know there is a dedicated tracker for the .NET version. I assume the In practice you can write such a |
@Arithmeticus I believe 6e334a4 provides what you are asking for. It would be good if you could give it a try. |
Actually, Java's |
this is now #39 |
didn't mean to close this one, I thought it was the one over in the Java project, sorry. |
Thanks. I had posted on the java section, because it looked like that's where the party was. I'll give your suggestions a try. |
Preliminary note, before more substantive comments. I managed to get the new XmlWhitespaceStrippedSource() object to work. It was challenging, because of gaps in the documentation. Note dead link: http://www.xmlunit.org/api/net/master/Org.XmlUnit.Builder/Input.html (host page https://github.com/xmlunit/user-guide/wiki/Providing-Input-to-XMLUnit#inputbuilder). I see https://www.xmlunit.org/api/net/2.9.2/Org.XmlUnit.Input/index.html but the documentation there seems incomplete. In the end I got it to work, but it took more time than I would have liked, and for anyone else trying to get their code to work, here's my approach:
The new object works as expected, even though that wasn't what I was hoping to get. See next post. |
Before submitting the ticket I had avoided the modified flavors of That said, in figuring out the new class, I learned to appreciate the input For the purposes of documentation, it would be good to signal to users that the activity performed by |
Many thanks for the feedback @Arithmeticus . I consider the user's guide the primary documentation, so maybe https://github.com/xmlunit/user-guide/wiki/Providing-Input-to-XMLUnit would have been given better guidance - or not. If you feel the documentation is not adequate please help us improving it. Sometimes it is difficult to know what is lacking from the docs when you are too familiar with the code. I'll add |
OK, the builder has been adjusted and I've tried to clarify the docs a bit more. Also I've added more extensive content to the user guide. |
I am using XML Unit 2.9.2 within the context of a .NET 4.72 application.
The method
NormalizeWhitespace()
is keyed to the Unicode propertyZs
, which targets more than a dozen characters. But the specifications for XML define white space as only four characters: x9, xA, xD, x20, and that's the basis for standard technologies in the XML stack (e.g., XPath).I can see the utility for the current XML Unit approach to whitespace, but I’m in a position where I need to use the more restrictive official XML definition. Could XML Unit 2 and 3 be enhanced to allow users to choose between definitions of whitespace?
The text was updated successfully, but these errors were encountered: