Closed
Bug 106844
Opened 24 years ago
Closed 24 years ago
XSLT stylesheet of type text/xml not recognized; type text/xsl is recognized
Categories
(Core :: XSLT, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.9.6
People
(Reporter: brandon, Assigned: peterv)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
9.93 KB,
patch
|
hjtoi-bugzilla
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5) Gecko/20011011
BuildID: 2001101117
The XSLT stylesheet http://www.1122productions.com/brandon/xml/songlist.xsl is
not applied to the XML file. This file should be applied in the processing
instruction <?xml-stylesheet href="songlist.xsl" type="text/xml"?>. However,
the processing instruction <?xml-stylesheet href="songlist.xsl"
type="text/xsl"?> does seem to work, as shown on
http://www.1122productions.com/brandon/xml/a-text-xsl.xml.
The type text/xml is supposed to be the standard, I think.
Reproducible: Always
Steps to Reproduce:
1. Go to http://www.1122productions.com/brandon/xml/a-text-xml.xml
Actual Results: The XSLT stylesheet
http://www.1122productions.com/brandon/xml/songlist.xsl is not applied to the file.
Expected Results: The stylesheet should be applied, with the results looking
like http://www.1122productions.com/brandon/xml/a-text-xsl.xml.
In addition, the title tag does not work in the template in songlist.xsl; the
text should match the h1 tag that does appear. I can file another bug for this
if desired.
<xsl:template match="Songlist">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fight Songs: <xsl:value-of select="@letter"/></title>
</head>
<body>
<h1>Fight Songs: <xsl:value-of select="@letter"/></h1>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
Updated•24 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Peter, didn't you fix this already?
Assignee: heikki → kvisco
Component: XML → XSLT
QA Contact: petersen → kvisco
| Assignee | ||
Comment 2•24 years ago
|
||
This fails because we pass text/xml to nsTransformMediator::Init
(http://lxr.mozilla.org/seamonkey/source/content/xsl/document/src/nsTransformMediator.cpp#75).
Two ways to fix this, add the categories for text/xml and application/xml or
hardcode the contract id with text/xsl.
Transformiix could register itself with the different categories but as they are
the same, maybe we should hardcode it. Heikki, what do you think would be best?
Assignee: kvisco → peterv
Priority: -- → P3
Target Milestone: --- → mozilla0.9.6
| Assignee | ||
Comment 3•24 years ago
|
||
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 4•24 years ago
|
||
Looking for reviews.
Ouch, this seems horrible. NS_ConvertASCIItoUCS2(kXSLType) makes a new string
class !
+ if ((Compare(aType, NS_ConvertASCIItoUCS2(kXSLType),
+ nsCaseInsensitiveStringComparator()) == 0) ||
+ (Compare(aType, NS_ConvertASCIItoUCS2(kXMLTextContentType),
+ nsCaseInsensitiveStringComparator()) == 0) ||
+ (Compare(aType, NS_ConvertASCIItoUCS2(kXMLApplicationContentType),
+ nsCaseInsensitiveStringComparator()) == 0)) {
How about aType.EqualsIgnoreCase(kXSLType) etc.
Comment 6•24 years ago
|
||
Comment on attachment 55989 [details] [diff] [review]
Fix v1
Global suggestions:
I guess I prefer |const nsAString&| over |const nsAReadableString&|.
Instead of #include'ing nsAReadableString.h, #include nsAString.h or nsString.h
I guess you should use .EqualsIgnoreCase or .EqualsWithConversion with the case parameter specified instead of these |Compare|s, till we have a way to do the same with |Compare|.
- if (nsnull == it) {
+ if (it) {
return NS_ERROR_OUT_OF_MEMORY;
I'm sure you meant:
|if (!it)|
+ mTransformer = do_CreateInstance(contractID, &rv);
keep the |.get()| there, do_CreateInstance takes a const char*, not a nsCString, and I'm in the process of removing the implicit conversion.
| Assignee | ||
Updated•24 years ago
|
Attachment #55989 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•24 years ago
|
||
Comment on attachment 56117 [details] [diff] [review]
v2
r=heikki
Attachment #56117 -
Flags: review+
Comment 9•24 years ago
|
||
Comment on attachment 56117 [details] [diff] [review]
v2
sr=jst
Attachment #56117 -
Flags: superreview+
| Assignee | ||
Comment 10•24 years ago
|
||
Really fixed now.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 11•23 years ago
|
||
we didn't verify for a long time.
I really checked, so VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•