Closed
Bug 70882
Opened 24 years ago
Closed 22 years ago
Transformiix does not handle embedded stylesheets.
Categories
(Core :: XSLT, defect, P5)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: darkmane, Assigned: keith)
Details
Attachments
(2 files, 1 obsolete file)
590 bytes,
text/xml
|
Details | |
9.59 KB,
patch
|
peterv
:
review+
jst
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
Section 2.7 of the Spec talks about embedded stylesheets. Standalone transformiix says it cannot open the file for the embedded stylesheets.
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
confirming and futuring this one. How would we want to do this? Create a mockup document? Axel
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Future
Reporter | ||
Comment 3•23 years ago
|
||
Note: I am not a good C++ programer and I have little experience working with streams. I suggest that we read the stylesheet element into a stream and pass that stream to the function described at http://lxr.mozilla.org/seamonkey/source/extensions/transformiix/source/xslt/XSLTProcessor.h#157
Reporter | ||
Comment 4•23 years ago
|
||
I did some investigating on this. This won't be possible without implementing GetElementByID. That would probably be more work than it's worth for standalone. However, don't we already have this for the module? If so, implementing this should not be that difficult. I was able to get a possible solution until if found out getElementByID was just a stub, so anybody should be able to get it working.
Updated•23 years ago
|
Priority: -- → P5
patch that implements embedded stylesheet for module and standalone. Note however that since standalone doesn't support getElementById it still won't work. However implementing getElementById is IMO a different bug. The patch also fixes bug 97621 since otherwise we'd go in a neverending recursion when the embedded stylesheet is embedded in the source doc
i should start using PatchMaker
Comment 7•23 years ago
|
||
Comment on attachment 71194 [details] [diff] [review] missed part of the patch >@@ -100,15 +103,33 @@ > NS_IMETHODIMP > nsXSLContentSink::DidBuildModel(PRInt32 aQualityLevel) > { >- nsCOMPtr<nsIDOMNode> styleDoc; >- nsresult rv; >- > mDocument->SetRootContent(mDocElement); > mDocument->EndLoad(); >- styleDoc = do_QueryInterface(mDocument, &rv); >- if (NS_SUCCEEDED(rv) && mXSLTransformMediator) { >+ >+ nsCOMPtr<nsIDOMNode> styleNode; >+ nsCOMPtr<nsIURL> url = do_QueryInterface(mDocumentURL); >+ if (url) { >+ nsXPIDLCString ref; >+ url->GetRef(getter_Copies(ref)); >+ if (!ref.IsEmpty()) { >+ nsCOMPtr<nsIDOMDocument> styleDoc = do_QueryInterface(mDocument); >+ NS_ENSURE_TRUE(styleDoc, NS_ERROR_NO_INTERFACE); Not sure if you should use NS_ERROR_NO_INTERFACE here. I thought that was used for functions where you pass in an interface and expect something back. >@@ -2344,7 +2375,18 @@ > importFrame.addAfter(new ProcessorState::ImportFrame(0)); > if (!importFrame.next()) > return NS_ERROR_OUT_OF_MEMORY; >- processStylesheet(&sourceDocument, &xslDocument, &importFrame, &ps); >+ nsCOMPtr<nsIDOMDocument> styleDoc = do_QueryInterface(aStyleDOM); >+ if (styleDoc) { >+ processStylesheet(&sourceDocument, &xslDocument, &importFrame, >+ &ps); >+ } >+ else { >+ nsCOMPtr<nsIDOMElement> styleElem = do_QueryInterface(aStyleDOM); >+ NS_ENSURE_TRUE(styleElem, NS_ERROR_FAILURE); >+ Element* element = xslDocument.createElement(styleElem); >+ NS_ENSURE_TRUE(styleElem, NS_ERROR_OUT_OF_MEMORY); You mean element instead of styleElem. r=peterv.
Attachment #71194 -
Flags: review+
Updated•23 years ago
|
Attachment #71137 -
Attachment is obsolete: true
Attachment #71137 -
Flags: review+
changed styleElem -> element locally. Didn't change the errorcode (peterv was ok with that)
Status: NEW → ASSIGNED
Comment 9•23 years ago
|
||
Comment on attachment 71194 [details] [diff] [review] missed part of the patch sr=jst
Attachment #71194 -
Flags: superreview+
Comment 10•22 years ago
|
||
Comment on attachment 71194 [details] [diff] [review] missed part of the patch a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #71194 -
Flags: approval+
upps, this was fixed a long time ago
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 12•22 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
•