XML Editing

Here is a screenshot of editing a .jspx file (which are xml).

The DTDs are all correctly configured in Settings|Resources (See 2nd screenshot).

Is there anything that can be done to improve this, or is this a known bug ?



Attachment(s):
snapshot1.png
snapshot2.png
0
10 comments

Hi,

What is the message on the red attributes?
It would be very helpful to post the schema / xml as JIRA item also, if
possible. Thank you in advance.

Grant Smith wrote:

Here is a screenshot of editing a .jspx file (which are xml).

The DTDs are all correctly configured in Settings|Resources (See 2nd screenshot).

Is there anything that can be done to improve this, or is this a known bug ?



------------------------------------------------------------------------



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Done.

http://www.jetbrains.net/jira/browse/IDEA-2507

contains the TDL file, as well as a new screenshot showing the error (Attribute ... is not allowed here)

0

I hope this issue will be fixed by next eap. By the way, from next EAP
watch for your contentType attribute in page directive since it has
influence on our analysis (for your particular case I suppose it will be
"text/xml").

IK

Grant Smith wrote:

Done.

http://www.jetbrains.net/jira/browse/IDEA-2507

contains the TDL file, as well as a new screenshot showing the error (Attribute ... is not allowed here)

0

Hm, I'm not sure it's correct to mandate contenttype in a page.

If you look at the spec, it clearly spells out the steps required to detect whether a page should be treated as a jsp page or a jsp document (regular vs xml), this involves checking web.xml to see if the page is specified in any group then checking the file extension.

0

As a matter of fact we determine not the language for this page (it's
JSP by your file type settings), but one for your template data. For
example if you set up contentType to text/xml it will be xml (not html
which is by default). Currently you can try following content types:
text/html
text/xhtml
text/xml
text/css
text/java
text/javascript.
This technology is new and not stable but we hope to increase its
stability with your help.

IK


Hani Suleiman wrote:

Hm, I'm not sure it's correct to mandate contenttype in a page.

If you look at the spec, it clearly spells out the steps required to detect whether a page should be treated as a jsp page or a jsp document (regular vs xml), this involves checking web.xml to see if the page is specified in any group then checking the file extension.

0

Igor Kuralenok (JetBrains) wrote:

Currently you can try following content types:
text/xhtml


Just a note, the official* XHTML content type is "application/xhtml+xml". I've personally
never seen "text/xhtml" and am pretty sure this might cause trouble with most browsers.

Sascha

http://www.w3.org/TR/xhtml-media-types/#application-xhtml-xml

0

Just a note, the official* XHTML content type is
"application/xhtml+xml". I've personally
never seen "text/xhtml" and am pretty sure this might
cause trouble with most browsers.


And application/xml isn't unheard of either -- you could add this to your list as accepted content types for XML.

0

I afraid I just don't understand why I need to change my contentType to "text/xml". I want the content type rendered on the browser to be "text/html". However, I want to edit this .jspx file as an XML file!

Perhaps I'm missing something ?

0

That's only for .jsp files. .jspx is known to have xhtml as its base language,
isn't?
-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"


0

Not at all. JSP "documents" (which are .jspx files) differ from JSP "pages" (which are .jsp files) in that the former are XML documents and are JSP version 2.0.

The resulting content type which is rendered has NOTHING to do with the fact that you are creating a .jspx document. You can have whatever content you like by specifying it in <jsp:directive.page contentType="whatever" />. Whether that is text/html, text/mxl, svg, etc.. doesn't matter.

I don't understand why IDEA has to care about the OUTPUT content that a .jspx will produce. It doesn't have to edit that. All it has to do is edit the .jspx document itself. Right ?

0

Please sign in to leave a comment.