[oXygen-user] Indentation, and diffing

Florent Georges
Thu Dec 17 15:13:04 CST 2009


  Hi,

  I've just installed the brand-new 11.1.  Congrats!  Just a
couple of questions/remarks.  The announce says "Visual Editing
of the XSLT Documentation".  How can I use it?

  I sometimes, in quite specific cases, do align attributes and
namespace declarations of an element each on its own line, the
first one after the element name then other at the same position
as the first one:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
                    xmlns:http="http://www.expath.org/mod/http-client"
                    xmlns:ser="http://www.fgeorges.org/xslt/serial"
                    exclude-result-prefixes="#all"
                    version="2.0">

  I've never used Cmd-P on stylesheets, but with the new
documentation system, I do, as my stylesheets do contain text
elements now.  And those attributes are realigned like this:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
       xmlns:http="http://www.expath.org/mod/http-client"
       xmlns:ser="http://www.fgeorges.org/xslt/serial" exclude-result-prefixes="#all"
       version="2.0">

  Is it possible to tell oXygen to not indent attributes aligned
on their element's name?

  Another strange behaviour is reformatting the following:

    <xsl:sequence select="
        if ( exists($relative) ) then
          resolve-uri($relative, $base)
        else
          $base"/>

as:

    <xsl:sequence
       select="
        if ( exists($relative) ) then
          resolve-uri($relative, $base)
        else
          $base
    "/>

  And if I copy and paste the former, I get the following:

    <xsl:sequence select="
       if ( exists($relative) ) then
       resolve-uri($relative, $base)
       else
       $base"/>

Lines are re-indented (with 3 spaces instead of 4) and all on the
same column.  This is quite perturbing to have the usual paste to
format the pasted content.

  And last but not least, I often align attributes of different
elements, on subsecutive lignes, on the same columns:

    <xsl:variable name="one"      select="..."/>
    <xsl:variable name="thirteen" select="..."/>
    <xsl:variable name="two"      select="..."/>

But after Cmd-P, all attributes are separated by one single space
(when they stay on the same line).  Is there a way to disable
changing the spaces between attributes?

  Oh yes...  And I like the standalone diff application!  When
diffing two XML files, is it possible to save a third file, with
diffs annotated?  To get something like the XMLSpec diff version?
I know diffing XML is a hard problem, because of the numerous
ways of defining what's a difference, what's an addition, what's
a modification, etc.  But that would be very helpful as a first
draft, even if we had to fine-tune the file by hand in a second
time.

  Well, sorry for all those little, various notes in a single
email..  Hope that helps!

  Regards,

-- 
Florent Georges
http://www..fgeorges.org/




















      




More information about the oXygen-user mailing list