Closed
Bug 299918
Opened 19 years ago
Closed 18 years ago
transformToX without matching templates neither errors nor outputs text content of default template
Categories
(Core :: XSLT, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: surkov, Assigned: peterv)
Details
Attachments
(2 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050530 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050530 When I pass DOM node to transformToX method of XSLTProcessor object then method always returns empty document (document.documentElement is null). When I pass DOM Document then method returns valid XML document. Reproducible: Always
| Reporter | ||
Comment 2•19 years ago
|
||
| Reporter | ||
Comment 3•19 years ago
|
||
save xsl on root of hard disc c:/ or change path of xsl in xul file.
Comment 4•19 years ago
|
||
Well, with that testcase I see the issue...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•19 years ago
|
||
This happens because the stylesheet doesn't match a single node, and thus not a single element is produced. I would expect that the default stylesheet do generate some text content for the script tag content, but that's it, as we never add an element, that just ends up in nirvana. I wonder if we want to throw an error on that.
Summary: transformTo methods of XSLTProcessor aren't able to work with DOM node → transformToX without matching templates neither errors nor outputs text content of default template
Alexander: Could you test if this has been fixed now? The fix in bug 187620 should have taken care of this one too.
| Reporter | ||
Comment 7•19 years ago
|
||
(In reply to comment #6) > Alexander: Could you test if this has been fixed now? The fix in bug 187620 > should have taken care of this one too. > I changed a testcase, just run it. I guess problem is there.
Attachment #188617 -
Attachment is obsolete: true
| Reporter | ||
Updated•19 years ago
|
Attachment #215212 -
Attachment is patch: false
| Reporter | ||
Updated•19 years ago
|
Attachment #215212 -
Attachment mime type: text/plain → application/vnd.mozilla.xul+xml
Could you attach a testcase that works right out of bugzilla, i.e. without requesting UniversalXPConnect
This is invalid. The reason that the default templates don't generate any text is that the only text in the document lives inside a <script> element. And the XUL parser doesn't generate text nodes for such text. So what happens is that the template in the stylesheet never matches and so only the default rules are used. And since there is no text in the document the default templates generate no content at all.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•