Project

Profile

Help

Bug #1440

closed

Unreliable results when iterating the HTML DOM attribute axis if new-line character occurs within attribute values

Added by Philip Fearon almost 13 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
2012-03-22
Due date:
% Done:

100%

Estimated time:
Platforms:

Description

This issue is specific to the attribute axis for the HTML page, so affects expressions such as $element/@@* where @$element is an element within the HTML page. It's know to affect the Chrome and Internet Explorer browsers. The problem only occurs when new-line characters occur in one of the attribute values of @$element@.

The first error message seen for this was: XTDE0850: Invalid attribute name: "data-type - this was caused by the XSLT:

@<xsl:template match="attribute::*" mode="sxedit:restore sxedit:update" priority="-0.5">

<xsl:attribute name="{name(.)}" select="." />

</xsl:template>@

In this case, name(.) was returning the value: "data-type (the first character being a double-quote).

The workaround is to avoid inserting new-line characters into HTML attribute values where they're not already normalized by the browser

Actions #1

Updated by Philip Fearon over 12 years ago

  • Status changed from New to Resolved

Resolved. The attribute parsing has been fixed. But as this is only required for older version of Internet Exporer (pre-IE8) a check is now in place to ensure that normally the DOM attributes property is used for attributes - the parser is only used for cases where this property is not supported fully by the browser.

Actions #2

Updated by Philip Fearon over 12 years ago

  • Fixed in version set to Beta 0.2
Actions #3

Updated by Philip Fearon over 12 years ago

  • Sprint/Milestone set to Beta 0.2
Actions #4

Updated by O'Neil Delpratt almost 12 years ago

  • Status changed from Resolved to Closed
  • Fixed in version changed from Beta 0.2 to 1.0

Fixed in Saxon-CE version 1.0

Actions #5

Updated by O'Neil Delpratt almost 12 years ago

  • Sprint/Milestone changed from Beta 0.2 to Release 1.0
  • % Done changed from 0 to 100

Please register to edit this issue

Also available in: Atom PDF