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

Provide a public version of LibXML_test_node_name from LibXML.xs #42

Open
vinc17fr opened this issue Dec 16, 2019 · 1 comment
Open

Comments

@vinc17fr
Copy link

In some cases, e.g. in some format conversions to XML, it is useful to know whether a string is a valid Name. LibXML.xs has a function to do such a check: LibXML_test_node_name. But this function is not available in the public API. I suppose that a current solution would be to use XML::LibXML::Attr->new and test whether the result is defined, but that's overkill and the behavior in case of invalid name is even undocumented. Thus a public version of LibXML_test_node_name would be useful.

@shlomif
Copy link
Owner

shlomif commented Dec 16, 2019

In some cases, e.g. in some format conversions to XML, it is useful to know whether a string is a valid Name. LibXML.xs has a function to do such a check: LibXML_test_node_name. But this function is not available in the public API. I suppose that a current solution would be to use XML::LibXML::Attr->new and test whether the result is defined, but that's overkill and the behavior in case of invalid name is even undocumented. Thus a public version of LibXML_test_node_name would be useful.

@vinc17fr : I agree. Would you like to prepare a pull-req for that (with tests - see https://github.com/shlomif/what-you-should-know-about-automated-testing )?

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