Skip to content

Add trusted options to XML functions#2656

Open
GuntherRademacher wants to merge 2 commits intoBaseXdb:mainfrom
GuntherRademacher:trusted-xml-parsing
Open

Add trusted options to XML functions#2656
GuntherRademacher wants to merge 2 commits intoBaseXdb:mainfrom
GuntherRademacher:trusted-xml-parsing

Conversation

@GuntherRademacher
Copy link
Copy Markdown
Member

This PR adds support for the XQuery 4.0 trusted option to fn:doc, fn:doc-available, fn:parse-xml, and fn:parse-xml-fragment.

It also renames xsi-schema-location to use-xsi-schema-location (this is a breaking change).

External-resource features are now protected on two levels:

  • Perm.CREATE is required for options that may trigger external access (dtd, dtd-validation, xinclude, and use-xsi-schema-location with active XSD validation)
  • the fn-level trusted option decides whether this access is actually allowed, otherwise FODC0016 is raised

dtd-validation may now trigger external DTD loading independently of dtd.

The implementation-defined default for omitted fn-level trusted is controlled by FNXMLTRUSTED. It defaults to true for backwards-compatible behavior. The QT3 test driver sets FNXMLTRUSTED to false to test the spec default.

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

Successfully merging this pull request may close these issues.

1 participant