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 over 12 years ago. Updated over 11 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

Please register to edit this issue

Also available in: Atom PDF