In-Context Validation/Transformation

Registered by manu3d

Transformation (xsl) and validation (dtd/xsd/rng/sch) are highly useful features in lxml. However, they generally tend to act on isolated trees. For example, applying an xsl transformation on a non-root element first detaches the element (and its sub-tree), then applies the transformation and finally attaches it back.

This might be desirable in some cases but there are circumstances when it is useful to validate or transform a sub-tree of a document -in context- and without affecting the rest of the tree.

A typical scenario is the insertion of an untransformed sub-tree in an already xsl-transformed document. Applying the xsl transformation to the whole document again might be unnecessary in the best of circumstances and cause corruption in the worst. In this case transforming -only- the sub-tree given the context in which it has been inserted would be the ideal solution.

Similarly, a developer manipulating an xml document might not necessarily want to re-validate the whole document after a sub-tree insertion, but would rather re-validate only the inserted sub-tree in the wider context of the document.

Similar considerations may be made for the modification or removal of sub-trees. One might want to make sure that the modification or removal has not invalidated the document and rather than revalidate the whole thing it revalidate the subtree in which the modification or removal has occurred, again in the context of the whole document.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.