ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> visual-xslt-discuss
visual-xslt-discuss
Re: [Visual-XSLT-discuss] Formatting/pretty-printing xml/xsl in the editor
by Eric Promislow other posts by this author
Jan 7 2003 9:18PM messages near this date
view in the new Beta List Site
Re: [Visual-XSLT-discuss] Formatting/pretty-printing xml/xsl in the editor | Re: [Visual-XSLT-discuss] Formatting/pretty-printing xml/xsl in the editor
Hi, Taras,

We actually hard-wired this behavior into the Visual XSLT Format
command, when several others pointed out that most XSLT programmers
prefer not to indent the top-layer XSLT tags inside the stylesheet.

We'll make this a user-configurable option in a future release.

As for pretty-printing in the XML window, we've assumed most 
people using XSLT are content to use the Microsoft XML editor
for their XML documents.  Maybe we need a brief show of hands
here to gauge interest in an ActiveState-written XML language
service to provide features like auto-indent, schema-based
code-completion, etc.

- Eric

On Tue, Jan 07, 2003 at 09:48:17PM +0100, Taras Tielkes wrote:
>  Hi Eric,
>  
>  Two remarks:
>  
>  1) When I try this on the following xslt document
>  
>  <?xml version="1.0"?>
>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>  version="1.0">
>       <xsl:template match="/">
>       </xsl:template>
>  </xsl:stylesheet>
>  
>  .., the result is:
>  
>  <?xml version="1.0"?>
>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>  version="1.0">
>  <xsl:template match="/">
>  </xsl:template>
>  </xsl:stylesheet>
>  
>  Eg., template element children of the stylesheet element are not
>  indented.
>  
>  2) Would it be possible to add auto-formatting for source XML
>  documents to the next version?
>  Actually, I think it makes much more sense to have this for XML than
>  for XSLT since you're usually in control of the XSLT yourself, while
>  sometimes the source XML is machine-generated.
>  
>  What's the reason for the formatting limitation you mentioned? It
>  would be very easy to implement a formatter without such a limitation
>  by just having a visitor traverse the parsed xml. Indeed, a XSLT sheet
>  can be written that does this in a couple of lines.
>  
>  Regards,
>  
>  tt
Thread:
Taras Tielkes
Taras Tielkes
Taras Tielkes
Eric Promislow
Eric Promislow
Stuart Celarier

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved