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

Allow escaping of quotes #5

Closed
Fuzzyma opened this issue Oct 1, 2016 · 1 comment
Closed

Allow escaping of quotes #5

Fuzzyma opened this issue Oct 1, 2016 · 1 comment

Comments

@Fuzzyma
Copy link

Fuzzyma commented Oct 1, 2016

I see myself often want to use something like this:

xidel foo.htm -e 'join(//something, "\",\""')
                                   --^^-^^--note these

Basically joining stuff together in csv format which requires quoted strings. However: xidel fails when using doublequotes there so the escaping does not work.
Is there a workaround or is there a chance that escaping gets added to xidel?

PS: Awesome tool!

@benibela
Copy link
Owner

benibela commented Oct 1, 2016

It has escaping according to the XPath/XQuery standard ( https://www.w3.org/TR/xquery-31/#id-literals ):

Basically you need to write "" rather than \".

In XQuery mode you can also write "

I was not sure which mode should be the default, so I made a survey

In XPath/XQuery 3.1, which I have not yet implemented, there is an additional string type surrounded by :

 ``[ ]`` 

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