Project

Profile

Help

Bug #1440

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

Added by Philip Fearon over 9 years ago. Updated over 8 years ago.

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

100%

Estimated time:

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

History

#1 Updated by Philip Fearon over 9 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.

#2 Updated by Philip Fearon over 9 years ago

  • Fixed in version set to Beta 0.2

#3 Updated by Philip Fearon over 9 years ago

  • Sprint/Milestone set to Beta 0.2

#4 Updated by O'Neil Delpratt over 8 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

#5 Updated by O'Neil Delpratt over 8 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