[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|