Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 149281 Details for
Bug 291960
XMLViewer makes (apparently) invalid assumptions about TransformerFactory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
v1
289573.305.patch (text/plain), 1.95 KB, created by
Angel Vera
on 2009-10-09 17:25:32 EDT
(
hide
)
Description:
v1
Filename:
MIME Type:
Creator:
Angel Vera
Created:
2009-10-09 17:25:32 EDT
Size:
1.95 KB
patch
obsolete
>Index: monitorui/org/eclipse/wst/internet/monitor/ui/internal/viewers/XMLViewer.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.internet.monitor.ui/monitorui/org/eclipse/wst/internet/monitor/ui/internal/viewers/XMLViewer.java,v >retrieving revision 1.15 >diff -u -r1.15 XMLViewer.java >--- monitorui/org/eclipse/wst/internet/monitor/ui/internal/viewers/XMLViewer.java 16 Jul 2007 18:59:08 -0000 1.15 >+++ monitorui/org/eclipse/wst/internet/monitor/ui/internal/viewers/XMLViewer.java 9 Oct 2009 21:24:45 -0000 >@@ -87,9 +87,16 @@ > messageLabel.setText(Messages.xmlViewInvalid); > return; > } >- if (xmlTagMissing && finalMsg.toLowerCase().startsWith("<?xml version=\"1.0\" encoding=\"utf-8\"?>")) { >- int x = finalMsg.indexOf("\n") + 1; >+ if (xmlTagMissing && (finalMsg.toLowerCase().startsWith("<?xml version=\"1.0\" encoding=\"utf-8\"?>") >+ || finalMsg.toLowerCase().startsWith("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>") >+ || finalMsg.toLowerCase().startsWith("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>"))) { >+ int x = finalMsg.indexOf(">") + 1; >+ //remove <?xml version="1.0" encoding="UTF-8"?> > String Msg = finalMsg.substring(x); >+ //remove starting newlines >+ while (Msg.substring(0, ls).indexOf(lineSeparator) >= 0){ >+ Msg = Msg.substring(ls, Msg.length()); >+ } > finalMsg = Msg; > > messageText.setText(finalMsg); >@@ -211,6 +218,7 @@ > Transformer transformer = tf.newTransformer(); > transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$ > transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$ >+ transformer.setOutputProperty(OutputKeys.STANDALONE, "no"); //$NON-NLS-1$ > transformer.transform(source, result); > } catch (TransformerConfigurationException e) { > throw (IOException) (new IOException().initCause(e));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 291960
:
149281
|
149282