[ANN] XPathView + XSLT-Support 1.0.1

Available via the Plugin Manager. Note that this version requires IDEA 5.0.1 (#3461) to be
listed in the Plugin Manager.

Changes:
- IDEA 5.0.1 compatibility
- Fixed wrong error highlighting with XML documents that have a DTD attached
- Fixed confusing tooltips for history navigation buttons
- Fixed lost focus after history navigation
- Usage View is now populated asynchronously
- Added ability to re-evaluate the expression in a Usage View (only as long as its
context node is still valid)
- Rename in XSLT no longer uses Java identifier rules
- Bundled XSLT schema from
http://www.intellij.net/forums/thread.jsp?forum=27&thread=159073&tstart=30&trange=15#4910892
- Included a quick XSLT feature-reference, accessible via the plugin's configuration dialog

Sascha

0
15 comments
Avatar
Permanently deleted user

Sascha, I still get "URI is not registered" and xsl:transform is red. I have the
latest version of the plugin. Here's my file:

<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:transform>

What do you think the problem is?

Sascha Weinreuter wrote:

Available via the Plugin Manager. Note that this version requires IDEA 5.0.1 (#3461) to be
listed in the Plugin Manager.

Changes:
- IDEA 5.0.1 compatibility
- Fixed wrong error highlighting with XML documents that have a DTD attached
- Fixed confusing tooltips for history navigation buttons
- Fixed lost focus after history navigation
- Usage View is now populated asynchronously
- Added ability to re-evaluate the expression in a Usage View (only as long as its
context node is still valid)
- Rename in XSLT no longer uses Java identifier rules
- Bundled XSLT schema from
http://www.intellij.net/forums/thread.jsp?forum=27&thread=159073&tstart=30&trange=15#4910892
- Included a quick XSLT feature-reference, accessible via the plugin's configuration dialog

Sascha

0
Avatar
Permanently deleted user

It turned out I already had some binding in Resources for a file that didn't
exist (in ~/Library/Preferences/something, so IDEA must have put it there
sometime). Maybe your plugin should check for this, but probably not.

Keith Lea wrote:

Sascha, I still get "URI is not registered" and xsl:transform is red. I
have the latest version of the plugin. Here's my file:

<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:transform>

What do you think the problem is?

Sascha Weinreuter wrote:

>> Available via the Plugin Manager. Note that this version requires IDEA
>> 5.0.1 (#3461) to be
>> listed in the Plugin Manager.
>>
>> Changes:
>> - IDEA 5.0.1 compatibility
>> - Fixed wrong error highlighting with XML documents that have a DTD
>> attached
>> - Fixed confusing tooltips for history navigation buttons
>> - Fixed lost focus after history navigation
>> - Usage View is now populated asynchronously
>> - Added ability to re-evaluate the expression in a Usage View (only
>> as long as its
>> context node is still valid)
>> - Rename in XSLT no longer uses Java identifier rules
>> - Bundled XSLT schema from
>> http://www.intellij.net/forums/thread.jsp?forum=27&thread=159073&tstart=30&trange=15#4910892
>>
>> - Included a quick XSLT feature-reference, accessible via the
>> plugin's configuration dialog
>>
>> Sascha

0
Avatar
Permanently deleted user

Keith Lea wrote:

It turned out I already had some binding in Resources for a file that
didn't exist (in ~/Library/Preferences/something, so IDEA must have put
it there sometime). Maybe your plugin should check for this, but
probably not.


Thanks for the note Keith. The plugin will check this during startup and print a warning
to the log file.

BTW: The currently released version of the plugin will probably not recognize your file
because its root tag is "template", but it expects it to be "stylesheet". This is 100%
compatible though and will be fixed in the next release.

Sascha

0
Avatar
Permanently deleted user

Have you thought about providing some way of using a sample file to enable more
completion in xslt files? For example, select="/[ctrl+space]" would show me
all root elements in the sample file. I think this would be very cool if done right.

Sascha Weinreuter wrote:

Keith Lea wrote:

>>It turned out I already had some binding in Resources for a file that
>>didn't exist (in ~/Library/Preferences/something, so IDEA must have put
>>it there sometime). Maybe your plugin should check for this, but
>>probably not.


Thanks for the note Keith. The plugin will check this during startup and print a warning
to the log file.

BTW: The currently released version of the plugin will probably not recognize your file
because its root tag is "template", but it expects it to be "stylesheet". This is 100%
compatible though and will be fixed in the next release.

Sascha

0
Avatar
Permanently deleted user

Also, have you thought of adding an action to apply some stylesheet in the
project to some xml file, and show the result in a temporary editor (or save the
result)? This would be cool too.

Sascha Weinreuter wrote:

Keith Lea wrote:

>>It turned out I already had some binding in Resources for a file that
>>didn't exist (in ~/Library/Preferences/something, so IDEA must have put
>>it there sometime). Maybe your plugin should check for this, but
>>probably not.


Thanks for the note Keith. The plugin will check this during startup and print a warning
to the log file.

BTW: The currently released version of the plugin will probably not recognize your file
because its root tag is "template", but it expects it to be "stylesheet". This is 100%
compatible though and will be fixed in the next release.

Sascha

0
Avatar
Permanently deleted user

I'm trying to convert IDEA's ActionManager.xml to an HTML file with an XSL
stylesheet. I don't know almost anything about XSL. I have this file:

IntelliJ IDEA Plugin API: Action ID's

(
)
               
ID Name

                 
]]>

The xsl:* tags anywhere inside the xsl:template are marked in red, but when I
run the stylesheet through xsltproc, it doesn't say the stylesheet is invalid
(but the output is not what I want). Is this a plugin bug or am I doing
somethign wrong?

Sascha Weinreuter wrote:

Keith Lea wrote:

>>It turned out I already had some binding in Resources for a file that
>>didn't exist (in ~/Library/Preferences/something, so IDEA must have put
>>it there sometime). Maybe your plugin should check for this, but
>>probably not.


Thanks for the note Keith. The plugin will check this during startup and print a warning
to the log file.

BTW: The currently released version of the plugin will probably not recognize your file
because its root tag is "template", but it expects it to be "stylesheet". This is 100%
compatible though and will be fixed in the next release.

Sascha


0
Avatar
Permanently deleted user

Keith Lea wrote:

Also, have you thought of adding an action to apply some stylesheet in
the project to some xml file, and show the result in a temporary editor
(or save the result)? This would be cool too.


Yes, I'm thinking of creating the ability to define run-configurations that run a certain
stylesheet with a configured or choosable XML document. But that isn't definitive yet,
I'll first have to finished some other cool stuff ;)

Sascha

0
Avatar
Permanently deleted user

Keith Lea wrote:

Have you thought about providing some way of using a sample file to
enable more completion in xslt files? For example,
select="/[ctrl+space]" would show me all root elements in the sample
file. I think this would be very cool if done right.


I haven't had a good idea yet how to associate such a sample file, but I was thinking
about using the schemas from other declared namespaces (if there are any). But I haven't
really looked at it and don't know if it's feasible. Do you have an idea how to associate
a sample file with a stylesheet? A processing instruction maybe?

<?default-input-file href="..." ?>

Or some other kind of configuration? What do you think?

Sascha

0
Avatar
Permanently deleted user

That sounds cool and important, but it would also be great to have something
simpler, where I could just click the file, click "Apply to XML file," click the
other file, and see the result immediately.

Sascha Weinreuter wrote:

Keith Lea wrote:

>>Also, have you thought of adding an action to apply some stylesheet in
>>the project to some xml file, and show the result in a temporary editor
>>(or save the result)? This would be cool too.


Yes, I'm thinking of creating the ability to define run-configurations that run a certain
stylesheet with a configured or choosable XML document. But that isn't definitive yet,
I'll first have to finished some other cool stuff ;)

Sascha

0
Avatar
Permanently deleted user

Keith Lea wrote:

The xsl:* tags anywhere inside the xsl:template are marked in red, but
when I run the stylesheet through xsltproc, it doesn't say the
stylesheet is invalid (but the output is not what I want). Is this a
plugin bug or am I doing somethign wrong?


No, the plugin doesn't color any tags itself, this is solely done by IDEA's DTD/Schema
support. This is also what the problem is: Because of your namespace declaration, IDEA
uses the DTD to validate the file, which doesn't allow any elements from other namespaces.
Use the real XHTML namespace URI instead (http://www.w3.org/1999/xhtml) which points to
the XHTML schema and it should be OK.

I just tested it with the correction and IDEA now complains "Failed to read schema
document 'null' ...". Don't know what the reason is. I could swear I've seen that working
with earlier builds...

Sascha

0
Avatar
Permanently deleted user

I actually think maybe some simple, dumb UI thing like a context menu item on
the xsl file, and an editaable list of sample files which are just stored in
project config. What do you think of that? The processing instruction sounds
fine too, but messier.

Sascha Weinreuter wrote:

Keith Lea wrote:

>>Have you thought about providing some way of using a sample file to
>>enable more completion in xslt files? For example,
>>select="/[ctrl+space]" would show me all root elements in the sample
>>file. I think this would be very cool if done right.


I haven't had a good idea yet how to associate such a sample file, but I was thinking
about using the schemas from other declared namespaces (if there are any). But I haven't
really looked at it and don't know if it's feasible. Do you have an idea how to associate
a sample file with a stylesheet? A processing instruction maybe?

<?default-input-file href="..." ?>

Or some other kind of configuration? What do you think?

Sascha

0
Avatar
Permanently deleted user

Sascha Weinreuter wrote:

Keith Lea wrote:

>>The xsl:* tags anywhere inside the xsl:template are marked in red, but
>>when I run the stylesheet through xsltproc, it doesn't say the
>>stylesheet is invalid (but the output is not what I want). Is this a
>>plugin bug or am I doing somethign wrong?


No, the plugin doesn't color any tags itself, this is solely done by IDEA's DTD/Schema
support. This is also what the problem is: Because of your namespace declaration, IDEA
uses the DTD to validate the file, which doesn't allow any elements from other namespaces.
Use the real XHTML namespace URI instead (http://www.w3.org/1999/xhtml) which points to
the XHTML schema and it should be OK.

I just tested it with the correction and IDEA now complains "Failed to read schema
document 'null' ...". Don't know what the reason is. I could swear I've seen that working
with earlier builds...

Sascha


I get the same error. I've filed http://jetbrains.net/jira/browse/IDEA-5314
about it.

0
Avatar
Permanently deleted user

Keith Lea wrote:

I actually think maybe some simple, dumb UI thing like a context menu
item on the xsl file, and an editaable list of sample files which are
just stored in project config. What do you think of that?


Yes, that's probably the easiest way since this won't change too often once it is
configured for the first time per file. I'll put it on on the todo-list.

The processing instruction sounds fine too, but messier.


I don't like the idea to store IDE-specific stuff in code, but since this is already
present as annotations/@noinspection tags, I might consider it if it's requested.

Sascha

0
Avatar
Permanently deleted user

Keith Lea wrote:

That sounds cool and important, but it would also be great to have
something simpler, where I could just click the file, click "Apply to
XML file," click the other file, and see the result immediately.


Hmm, depends on what "click the other file" would actually look like... Do you mean to
choose a file that is already opened in another editor and display some kind of popup menu
to select it? Or just open a file chooser? Wouldn't that be too inconvenient though? XSLT
files are usually run more than once or twice while developing them...

Maybe this could be combined with the ability to associate XML files for completion
purposes, which would make it possible to one-click run the stylesheet with the associated
input file. Doesn't sound too bad either.

Sascha

0
Avatar
Permanently deleted user

Sascha Weinreuter wrote:

Keith Lea wrote:

>>That sounds cool and important, but it would also be great to have
>>something simpler, where I could just click the file, click "Apply to
>>XML file," click the other file, and see the result immediately.


Hmm, depends on what "click the other file" would actually look like... Do you mean to
choose a file that is already opened in another editor and display some kind of popup menu
to select it? Or just open a file chooser? Wouldn't that be too inconvenient though? XSLT
files are usually run more than once or twice while developing them...

Maybe this could be combined with the ability to associate XML files for completion
purposes, which would make it possible to one-click run the stylesheet with the associated
input file. Doesn't sound too bad either.

Sascha


Maybe you should make it very easy to create a run configuration (like with the
context menu like we said), and that will solve the problem.

0

Please sign in to leave a comment.