[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Move elements to preceding parent

Subject: Re: Move elements to preceding parent
From: Israel Viente <israel.viente@xxxxxxxxx>
Date: Mon, 15 Jun 2009 16:59:11 +0300
Re:  Move elements to preceding parent
I used Catalog to bypass the 503 HTTP errors, and the -expand:off
option on Saxon sure helped to remove almost all the extra attributes
except the xmlns:xsi.

Many thanks.

On Mon, Jun 15, 2009 at 4:23 PM, Martin Honnen<Martin.Honnen@xxxxxx> wrote:
> Israel Viente wrote:
>> Can you please explain the idea of the line:
>>>  <xsl:template match="p[preceding-sibling::p[1][span[@class ne 'chapter']
>>> and not(matches(span[@class ne 'chapter'][last()], '[.?&quot;!]$'))]]"/>
>> Does it remove the p  that has preceding sibling with no ending
>> character at the end of the last span?
> Yes, that template matches p elements where the immediately preceding p
> element is one with a span child where class is not 'chapter' and where the
> last such span element does not end with one of those characters you
> As the template is empty it ensure that any such p elements are not copied.
>> How can I remove the following:
>> 1. extra xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" and
>> version="-//W3C//DTD XHTML 1.1//EN" inside html element.
>> 2. extra profile="" in head element
>> 3. extra xml:space="preserve" in p, span and br elements.
> Unfortunately any attempts to transform a document referencing a DTD on
> www.w3.org currently fail here with 503 HTTP errors so I can't test myself.
> I would assume that the referenced DTD you have defines default values for
> those attributes that the XML parser expands and that the identity
> transformation copies. According to
> http://www.saxonica.com/documentation/using-xsl/commandline.html
> Saxon 9 has a command line option
>  -expand:off
> to prevent that from happening so try that if you use Saxon.
> --
>        Martin Honnen
>        http://msmvps.com/blogs/martin_honnen/

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.