[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: PSVI using existing infoset items

  • From: Evan Lenz <elenz@x...>
  • To: Elliotte Rusty Harold <elharo@m...>, xml-dev@l...
  • Date: Tue, 16 Oct 2001 12:11:36 -0700

using psvi information
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.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.