Mixed content in XML [message #142698] |
Fri, 07 October 2005 07:13 |
Eclipse User |
|
|
|
Originally posted by: joakim.bindows.net
Hi
I am trying to create a new XML editor with mixed content. We have an XML
format that allow us to use <script> and <style> tag in the XML file so I
want the same features as in the HTML editor but without the HTML
validation.
I thought that it shouldn't be too difficult to achieve this but I can't get
it to work. I have started to use the XML editor and override
StructuredTextViewerConfigurationXML, StructuredTextPartitionerForXML and
XMLContentAssistProcessor. I hoped that this should be enough to get content
assist working but obviously not.
Have anybody tried this and if so, could you please share your knowledge. Do
you think it would be a better idea to use the HTML editor and change the
validator? Any help would be greatly appreciated. The documentation for the
whole WTP is quite sparse.
Best regards
Joakim Andersson
|
|
|
Re: Mixed content in XML [message #142781 is a reply to message #142698] |
Fri, 07 October 2005 14:51 |
Eclipse User |
|
|
|
Originally posted by: joakim.bindows.net
The problem seems to be to get the correct region type.
If I type something like this <window><script></script></window> and press
Ctrl+Space between the script tags, it works but not if I type
<window><script>document.</script></window> and press Ctrl-Space after the
dot.
Joakim Andersson
"Joakim Andersson" <joakim@bindows.net> wrote in message
news:di5771$nph$1@news.eclipse.org...
> Hi
>
>
>
> I am trying to create a new XML editor with mixed content. We have an XML
> format that allow us to use <script> and <style> tag in the XML file so I
> want the same features as in the HTML editor but without the HTML
> validation.
>
>
>
> I thought that it shouldn't be too difficult to achieve this but I can't
> get it to work. I have started to use the XML editor and override
> StructuredTextViewerConfigurationXML, StructuredTextPartitionerForXML and
> XMLContentAssistProcessor. I hoped that this should be enough to get
> content assist working but obviously not.
>
>
>
> Have anybody tried this and if so, could you please share your knowledge.
> Do you think it would be a better idea to use the HTML editor and change
> the validator? Any help would be greatly appreciated. The documentation
> for the whole WTP is quite sparse.
>
>
>
> Best regards
>
> Joakim Andersson
>
>
>
>
|
|
|
Re: Mixed content in XML [message #143521 is a reply to message #142781] |
Thu, 13 October 2005 18:38 |
Eclipse User |
|
|
|
Originally posted by: amywu.us.DELETETHISPART.ibm.com
Joakim,
Have you already read the following?
http://eclipse.org/webtools/wst/components/sse/overview.html
http://eclipse.org/webtools/wst/components/sse/designs/Edito rConfiguration.html
Conceptually, it sounds like you should build off the xml editor since
you're really adding to that editor rather than starting with the html
editor and taking features away.
Have you checked out StructuredTextViewerConfigurationHTML? You might want
to check out what was done with IHTMLPartitionTypes.SCRIPT. It looks like
what you could do is add a new script partition, like HTML did. Then in
your StructuredTextViewerConfigurationXML subclass, override
getContentAssistant, and add in the javascript content assist processor for
your special script partition.
"Joakim Andersson" <joakim@bindows.net> wrote in message
news:di6227$ur8$1@news.eclipse.org...
> The problem seems to be to get the correct region type.
>
> If I type something like this <window><script></script></window> and press
> Ctrl+Space between the script tags, it works but not if I type
> <window><script>document.</script></window> and press Ctrl-Space after the
> dot.
>
> Joakim Andersson
>
> "Joakim Andersson" <joakim@bindows.net> wrote in message
> news:di5771$nph$1@news.eclipse.org...
> > Hi
> >
> >
> >
> > I am trying to create a new XML editor with mixed content. We have an
XML
> > format that allow us to use <script> and <style> tag in the XML file so
I
> > want the same features as in the HTML editor but without the HTML
> > validation.
> >
> >
> >
> > I thought that it shouldn't be too difficult to achieve this but I can't
> > get it to work. I have started to use the XML editor and override
> > StructuredTextViewerConfigurationXML, StructuredTextPartitionerForXML
and
> > XMLContentAssistProcessor. I hoped that this should be enough to get
> > content assist working but obviously not.
> >
> >
> >
> > Have anybody tried this and if so, could you please share your
knowledge.
> > Do you think it would be a better idea to use the HTML editor and change
> > the validator? Any help would be greatly appreciated. The documentation
> > for the whole WTP is quite sparse.
> >
> >
> >
> > Best regards
> >
> > Joakim Andersson
> >
> >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03455 seconds