1 of 2
1
HTML+XML or XSLT Sugar
Posted: 02 July 2009 05:13 AM   [ Ignore ]
Member
RankRankRank
Total Posts:  75
Joined  2009-02-04

Does one exist?

I have code completion features in HTML pages, but as soon as I get into XSLT pages the code completion of my html code is no longer available.

Any advice?

Profile
 
 
Posted: 02 July 2009 02:34 PM   [ Ignore ]   [ # 1 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

XML and XSL is technically already covered by the bundled HTML sugar, but as you’ve discovered the support is pretty underwhelming.  Elliott Cable started a rewrite of the bundled sugars to better support the Espresso Sugar Standard naming conventions, and I’ll be picking up that project once I’ve got TEA to 1.0 final (since Elliott’s been a bit MIA for Espresso projects recently).  Feel free to file bug reports or feature requests over at the project’s GitHub Issues page:

http://github.com/elliottcable/espresso-sharedsupport/issues

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 02 July 2009 02:38 PM   [ Ignore ]   [ # 2 ]
Member
RankRankRank
Total Posts:  75
Joined  2009-02-04

Ian, thanks for responding - but I am starting to lose heart with the application.  I think when your competing against 3 giants in the coding world (TextMate, Coda and of course DW) more effort needs to be made by those who are charged with the responsibility.  Is there only Jan who is MacRabbit? 

Back to the HTML sugar, you understand what I mean, when your in a html page you type in <li> and it autocompletes it for you and gives you options.  Well when writing an XSL file, you don’t get the same effect.

Profile
 
 
Posted: 02 July 2009 02:50 PM   [ Ignore ]   [ # 3 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

Yeah, I know what you mean about XSL; as far as I know, the XSL syntax component of the HTML sugar defines the syntax zones for coloring, but doesn’t provide any codesense.

MacRabbit is Jan and Lenaic; early progress on the app has been slow because they’ve both had their time divided by graduating from university.  If I recall, Lenaic should be in the clear by this point, but Jan won’t have discharged all of his university responsibilities until August.  We all keep hoping that the pace will pick up (or that Jan and Lenaic start taking a more active/communicative stance toward their community, which would help discharge a lot of the frustration at perceived lack of progress), but so far no dice.  For some of us, like myself, the current strengths of the software make it worth using anyway (and continuing to work to improve through Sugars).  For others, Textmate or Coda are still the better options.

Even if you switch over to another app in the short term, I don’t think your investment in Espresso will be wasted.  Like Coda, Espresso has had a rough time getting off the ground, but I also expect it to hit its stride a few major version increases in (1.5 or so will probably be the sweet spot).  If the app’s shortcomings are interfering with your workflow/happiness too much right now, definitely don’t bash your head up against it too much; send MacRabbit your feature requests, and switch back to Textmate or Coda for the time being.

Definitely let folks in the forums know if you have any questions about working around Espresso’s shortcomings!

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 02 July 2009 02:52 PM   [ Ignore ]   [ # 4 ]
Member
RankRankRank
Total Posts:  75
Joined  2009-02-04

Well I would like to get involved in Sugar development too.  Although I am totally not experienced in that area, I would like to be.

Profile
 
 
Posted: 02 July 2009 03:01 PM   [ Ignore ]   [ # 5 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

If you’ve got basic skills with regex, getting into Sugars is mainly just a matter of figuring out the XML commands that you can use.

Starting with an expanded XSL definition might be a good place to start, since that’s something that’s directly impacting your productivity.  There’s a couple different routes you could take:

1) Contribute to the rewrite of the bundled sugars by grabbing the code at the GitHub repo I linked above

2) Create a standalone sugar that injects your additions into the bundled XSL syntax

The best places to go for info on creating sugars are the wiki, the IRC channel for real-time help, and looking at what’s going on in Sugars other people have coded (particularly the bundled Sugars in your case, if you decide to work on XSL).

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 02 July 2009 03:02 PM   [ Ignore ]   [ # 6 ]
Member
RankRankRank
Total Posts:  75
Joined  2009-02-04

May give it a shot.  Thanks Ian.

Profile
 
 
Posted: 27 May 2011 06:07 AM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  6
Joined  2009-02-07

bump

as for processing, this might be of some help?

Profile
 
 
Posted: 08 November 2011 02:05 PM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  11
Joined  2011-01-30

Did any decent code completion for XSLT ever came to be for Espresso (2.0) then?

Profile
 
 
Posted: 08 November 2011 02:20 PM   [ Ignore ]   [ # 9 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

Espersso 2 should automatically provide XSL-specific elements in CodeSense when working with XSL documents. Let us know if you run into trouble or find an element that is missing.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 09 November 2011 03:03 PM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  11
Joined  2011-01-30

I am not fluent in XSLT so I do not know if there is any element missing.

Yet, while elements are indeed auto completed and even some expand with some pre-added attributes, there is no completion for attributes or XPath functions.

Profile
 
 
Posted: 09 November 2011 03:54 PM   [ Ignore ]   [ # 11 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

Which attributes are not being autocompleted? If they attribute is a built-in XSL attribute, it should be included in CodeSense unless we missed it.

XPath relies on dynamically generating an understanding of the file you are styling, however. We do not have any short term plans to add support for that.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 09 November 2011 06:34 PM   [ Ignore ]   [ # 12 ]
Newbie
Rank
Total Posts:  11
Joined  2011-01-30

xsl:temp… autocompletes to simply:

<xsl:template></xsl:template

If I then backtrack and start adding na… as an attribute, I would expect it to become name. If I instead started typing ma…, match should autocomplete. None of that happens.

Regarding XPath, I said XPath functions, not XPath in general. I do understand XPath has too little grammar for the computer to predict what I intend to write. Yet it does seem predictable where functions are allowed, and once I want to use a specific function, how many arguments it may have.

Lastly, I have requested it before for other languages and I was answered that it did not match Macrabbit’s view, but having quotes appear in pairs when typed once or if something is currently selected having it wrapped would make XSLT coding much more productive.

Profile
 
 
Posted: 10 November 2011 10:45 AM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  11
Joined  2011-01-30

The element xsl:result-document does not autocomplete either.

Profile
 
 
Posted: 10 November 2011 02:43 PM   [ Ignore ]   [ # 14 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

Looks like there was a bug in the detection for tag names; we will fix this in future updates so that attributes show up in CodeSense correctly. We also added a simple result-document CodeSense completion; is that one that would make sense to have an automatic snippet, or is the use of it pretty flexible?

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 10 November 2011 02:55 PM   [ Ignore ]   [ # 15 ]
Newbie
Rank
Total Posts:  11
Joined  2011-01-30

Again, my experience with XSLT is not extensive enough to know what would be the best defaults.

According to the specs (as far as I understood it; it is not a particularly easy reading) all attributes are optional (so you could perfectly find < xsl:result-document/ > with no attributes).

I generally have only (but always) used href and format, though, like so:

<xsl:result-document format="myFormat" href="myURI"

but again I do not know how representative my use is.

Profile
 
 
   
1 of 2
1