Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code completion for LSP files with XML Schema #15

Closed
Nowaker opened this issue Jun 22, 2011 · 10 comments
Closed

code completion for LSP files with XML Schema #15

Nowaker opened this issue Jun 22, 2011 · 10 comments
Assignees

Comments

@Nowaker
Copy link
Collaborator

Nowaker commented Jun 22, 2011

Code completion for LSP files is trivial to achieve thanks to XML Schema.

<html xmlns:lsp="http://staldal.nu/LSP/core" xmlns="http://www.w3.org/1999/xhtml">

IntelliJ IDEA can download XML Schema from http://staldal.nu/LSP/core and start completing the code.
Could you please tell me if you control staldal.nu domain so that we can upload a file to http://staldal.nu/LSP/core? If not, we can switch to my domain (nowaker.net).

Now I'm starting with writing the XML Schema.

@ghost ghost assigned mikaelstaldal and Nowaker Jun 22, 2011
@mikaelstaldal
Copy link
Owner

Hi.

Code completion for LSP files is trivial to achieve thanks to XML Schema.

 <html xmlns:lsp="http://staldal.nu/LSP/core" xmlns="http://www.w3.org/1999/xhtml">

IntelliJ IDEA can download XML Schema from http://staldal.nu/LSP/core and start completing the code.
Could you please tell me if you control staldal.nu domain so that we can upload a file to
http://staldal.nu/LSP/core?

Yes, I control it, so we can upload a file there.

Now I'm starting with writing the XML Schema.

Nice.

@Nowaker
Copy link
Collaborator Author

Nowaker commented Jun 24, 2011

This simple schema should do. It would need some improvements but it's good enough for now.

@Nowaker Nowaker closed this as completed Jun 24, 2011
@Nowaker Nowaker reopened this Jun 24, 2011
@Nowaker
Copy link
Collaborator Author

Nowaker commented Jun 24, 2011

Please upload it to http://staldal.nu/LSP/core.

@ghost ghost assigned mikaelstaldal Jun 24, 2011
Nowaker added a commit that referenced this issue Jun 24, 2011
Nowaker added a commit that referenced this issue Jun 25, 2011
…ompletion, but still some errors when mixing with XHTML
@Nowaker
Copy link
Collaborator Author

Nowaker commented Jun 25, 2011

Quite good code completion, but img tag is underlined because of error: element lsp:attribute is not allowed here. I have to get to know if it is even possible to extend XHTML schema so that our tags are allowed inside it.

<img>
    <lsp:attribute name="alt" value="{$user.name}"/>
    <lsp:attribute name="src" value="{$user.profile.avatar.normal}"/>
</img>

@mikaelstaldal
Copy link
Owner

The file is uploaded now.

@mikaelstaldal
Copy link
Owner

Perhaps there is some schema for XSLT you can have a look at, they probably have the same problem.

@mikaelstaldal
Copy link
Owner

The problem is not only with the img tag, but more general about interaction with the XHTML schema. Try my updated example-xml.lsp.

@Nowaker
Copy link
Collaborator Author

Nowaker commented Jun 25, 2011

When committing something related with an issue, put #number in front of the commit message - then the commit notification goes here. :)

@Nowaker
Copy link
Collaborator Author

Nowaker commented Jun 25, 2011

xsi:schemaLocation="http://staldal.nu/LSP/core http://staldal.nu/LSP/core/lsp.xsd"

Can't be the XSD file just in http://staldal.nu/LSP/core? This makes fetching the schema way easier and does not require including the second URL in templates.

mikaelstaldal added a commit that referenced this issue Jun 25, 2011
mikaelstaldal added a commit that referenced this issue Jun 25, 2011
@mikaelstaldal
Copy link
Owner

Yes, that's better. Fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants