Skip to content
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

Writer concept is not flexible enough #37

Open
Ingrater opened this issue Nov 2, 2016 · 2 comments
Open

Writer concept is not flexible enough #37

Ingrater opened this issue Nov 2, 2016 · 2 comments

Comments

@Ingrater
Copy link

Ingrater commented Nov 2, 2016

I have a xml document that looks like this

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <source>
    <Item>Text1</Item>
    <Item>Text2</Item>
  <source>
<root>

The current writer concept does not allow formatting the document in this style. "afterNode" will be called always, even after text nodes. There is no context given to "afterNode" so its impossible to decide whether or not to place a newline. The same goes for the indentation. The writer concept should be extended to allow for this style of formatting (as its very common)

@lodo1995
Copy link
Owner

lodo1995 commented Nov 2, 2016

You are right. The hooks are not complete. I need to find the best balance between having the maximum customization and keeping the number of hooks reasonable.

@wilzbach
Copy link

This issue was moved to dlang-community/experimental.xml#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants