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

Inverse of apply-template select

Subject: Inverse of apply-template select
From: russurquhart1@xxxxxxxxxxx
Date: Thu, 13 Jan 2011 12:51:01 -0600 (CST)
 Inverse of apply-template select
I have an unprofiled docbook xml file i am trying to convert to my companys xml format, that is similar to docbook.

The xml file i have is of the following:

<book>
<title>...</title> 
<title>...</title> 
<title>...</title> 
.
.
.
<bookinfo>...</bookinfo>
<bookinfo>...</bookinfo>
<bookinfo>...</bookinfo>
...
<article>...</article>
...
</book>

I have templates to handle all the elements in the docbook file, and convert to our formats. One of the unique things about our xml, is that the bookinfo element, is renamed to userdocinfo, and MUST come before the title element. The rest of the elemtents are effectively renamed in situ.

So, for my book template i have the following:

<xsl:template match="book">
   <UserDoc>
      <xsl:apply-templates select="./bookinfo"/>
      <xsl:apply-templates select="./title"/>
         <GenSection>   

<!-- This line doesn't work. -->

            <xsl:apply-templates select="*[not(./bookinfo) or not(./title)]"/>

         </GenSection>
   </UserDoc>
</xsl:template>

I use the select attribute of the xsl:apply-templates to reorder and process bookinfo and title elements.

I want to then apply templates to the rest of the elements, EXCEPT the ones i just processed. I know this is just a matter of finding the right xpath for the select attribute, but i can't seem to find it.

Can anyone give me a little help or hint on this?

Thanks again for all your help!


Russ

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.