Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2207

Attribute is not a node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 2.7
    • None
    • Xalan
    • None
    • Linux amd64, java 1.5.0-05 64bit server mode

    Description

      Let the context attribute be foo="bar". I have the following template:
      <xsl:template match="*" mode="baz" priority="1">
      something2
      </xsl:template>
      <xsl:template match="node()" mode="baz" priority="0">
      something
      </xsl:template>

      When the context node is attribute and i call <xsl:apply-templates select="." mode="baz"/> it outputs text 'bar'. When I modify the template to

      <xsl:template match="node() | @*" mode="baz" priority="0">
      something
      </xsl:template>

      It outputs 'something' as it should. I think there are two errors:

      • attribute is not a node,
      • why it outputs the attribute value when the mode is not matched?

      Attachments

        Activity

          People

            Unassigned Unassigned
            vyzivus Martin Vysny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: