[Bug 3821] Enable element-available() to detect (extension) declarations

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3821

           Summary: Enable element-available() to detect (extension)
                    declarations
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: boen.robot@gmail.com
         QAContact: public-qt-comments@w3.org


Currently, the specs say that element-available() must only return true() on
supported XSLT instructions. I don't see any reason why it shouldn't also
return true() on supported XSLT declarations.

Infact, I see a benefit from that. For example, an author may need one behavior
when a(n extension) declaration element is available and another as a
workaround if that (extension) declaration is unsupported.

I guess that is what element-available() exists for anyway, but it's just that
if unsupported declarations are supposed to be ignored or fallback with some
default and unchangeable behaviour, enabling detection of declarations may
actually increase performance* when the declaration is supported while still
allowing the stylesheet to work in processors that don't support the targeted
declaration.

*That is if we suppose it takes longer to perform the workaround then the
declaration.

By the way, aren't the following elements instuctions?
xsl:matching-substring
xsl:non-matching-substring
xsl:otherwise
xsl:output-character
xsl:sort
xsl:when
xsl:with-param
Because the Element Syntax Summary doesn't define a category for them.

Received on Friday, 13 October 2006 12:16:21 UTC