OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xml-dev] PSVI using existing infoset items



Elliotte Rusty Harold wrote:
> This is still too complicated. In particular, it changes the
> parentage of elements and tree structure of an XML document.

No... I don't think his example changed any parentage information. I agree
that would be a significant change from XSLT's perspective.

> An
> XSLT style sheet that operated on the original document would
> likely fail when applied to the PSVI document. What's needed here
> is a pure attribute solution so that PSVI information can be
> merged with the original document without changing its basic
> structure.

This thought crossed my mind. However, the structure starts to become less
usable (thus defeating much of the purpose) when you try to encode it in
attribute values. The truth is that even adding attributes may break
existing stylesheets.

To me, the question should rather be: Is there a natural and recommended way
of writing stylesheets that allows me to easily ignore the additional PSVI
information?

The answer is yes. And it involves the generous use of template rules. I
would run into problems when using <xsl:for-each select="*"/>. But that's
why I favor <xsl:apply-templates select="*"/>. Then, I can easily, as Eric
suggested, insert a new template rule <xsl:template match="psvi:*"/> that
effectively ignores this additional information.

This use of template rules should go a long way in preserving the behavior
of existing stylesheets. Beyond that, you just have to be careful (with
preceding-sibling axis, etc.)

Evan Lenz
XYZFind Corp.