-
Notifications
You must be signed in to change notification settings - Fork 0
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
<pre>? <p xml:space="preserve">? #1
Comments
Hi, Good catch! Sounds like it'd be a bit tricky trying to check ancestor elements to see if they have the space attribute, so I might just preserve all whitespace. I'll do some tests and see how that output looks. Thanks for taking the time to review the transform, I appreciate it! Regards Dan |
My effort from two weeks ago is at https://xsltfiddle.liberty-development.net/gVAkJ52/9. I had to stop because it and the conversion the other way were taking more time than I could spare. It preserves the white-space, but there's still a lot that it gets wrong. I haven't looked into how to output namespace nodes, for instance. My approach was to be a base stylesheet that preserves all of the white-space with the option of developing a stylesheet for a specific schema/vocabulary. For example, a stylesheet for XSLT would import the base stylesheet but also include a template or templates to discard all white-space-only text nodes except inside |
Ah, so we'd have a transform that does the lions share of the work, then can have examples of the final piece, if they want whitespace Vs no whitespace, and so on? |
I think that we understand each other. If you convert some indented XSLT into XiK and edit that, you don't want to see the white-space from the XML that you (and the XSLT processor) ignore when the XSLT is written as XML. However, you also don't want it all as one line of XiK. If you look at the (However, if you convert |
The current code does not preserve white-space in either
<pre>
or<p xml:space="preserve">
.Handling
<pre>
correctly requires either a HTML-aware converter or preserving all white-space so that all white-space can all be round-tripped.The text was updated successfully, but these errors were encountered: