Project

General

Profile

Development #50

Add a strict mode for lasso_node_init_from_xml

Added by Benjamin Dauvergne almost 9 years ago. Updated almost 7 years ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Category:
XML Framework
Target version:
Start date:
22 May 2010
Due date:
% Done:

0%

Estimated time:
15.00 h
Patch proposed:
No
Planning:
No

Description

We already have some form of schema through the XmlSnippet structures. I think we could add more strict checking with some more flags and checking.

First we could check strict ordering since XSchema suppose it. That is we would match the sub-elements in-order unless specified otherwise (they are in an <xs:choice/>). As the XmlSnippet cannot be nested, the flag would be put on the sub-elements contained in the choice and would mean "don't care about my order", SNIPPET_UNORDERED wouldbe a good name.

Second we could check cardinality. I think there is only three cardinalities used in SAML standards:
  • needed (1)
  • optional (0 or 1)
  • optional-free (0 or more)
    that could be mapped to three new flags: SNIPPET_NEEDED, SNIPPET_OPTIONAL and SNIPPET_OPTIONAL_FREE.

We could even implement a script to check that all SNIPPET_OPTIONAL_FREE points to properly declared GList fields.

History

#1 Updated by Benjamin Dauvergne almost 9 years ago

  • Category set to XML Framework

#2 Updated by Benjamin Dauvergne almost 7 years ago

  • Assignee deleted (Benjamin Dauvergne)

Also available in: Atom PDF