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

cannot create string with XML newline character to use in formula #108

Open
MartijnR opened this issue Jan 16, 2014 · 2 comments
Open

cannot create string with XML newline character to use in formula #108

MartijnR opened this issue Jan 16, 2014 · 2 comments

Comments

@MartijnR
Copy link

The xml newline character is 


PYXForm will convert this to &#10.

Is there a workaround to prevent the & from being converted in the newline character?

I tried using an actual newline (with Ctrl-Enter) in the XLS sheet, but this does not have the desired result.

@ukanga
Copy link
Contributor

ukanga commented Jan 16, 2014

I suppose it is possible, we may need to switch from minidom to a different xml library perhaps lxml. I did notice lxml turns \r to 
, not sure if this is what you want. I suppose also, it will still not be possible to use 
 in xls, \r and probably \n will have to do. Not sure when I can get around to this, but am excited about it all together.

@MartijnR
Copy link
Author

Glad you're excited about it ;)

a real line break (with Ctrl-Enter) in e.g. the label does actually work correctly. The problem occurred when trying to do this in a formula.

concat($a, ' ', $b)

or

concat($a, '
', $b)

Maybe I can get the former to work on the Enketo side. It would probably be the most user-friendly way. Let me check.

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

2 participants