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

xsl-list question: import precedence with strip-space

Subject: xsl-list question: import precedence with strip-space
From: "Lynn Murdock" <lmurdock@xxxxxxxx>
Date: Mon, 11 Jan 2010 13:42:34 -0800
 xsl-list question: import precedence with strip-space
hi-

i'm new to this forum, so hope this is the correct procedure for posting.

i am using <xsl:import> to import a generic stylesheet into a more specific
stylesheet.  i'm getting an apparent conflict between the <xsl:strip-space>
instructions in the importing and imported documents: the 'elements' attribute
of the importing document contains a list of elements; the 'elements'
attribute of the imported document contains '*', and  it appears that either
the instruction in the importing document is being ignored or the instructions
from both documents are being used.

in the resulting transformation, whitespace is stripped between adjacent tags
within a paragraph, eg:
  </italic> <ext-link>
becomes
  </italic><ext-link>

when i had this error previously in just the importing document, removing 'p'
from the list of strip-space elements fixed the problem.  but now i suspect
that the '*' from the imported document is removing that space again.  i have
been able to fix the problem by adding 'p' to the <xsl:preserve-space>
element, but am wondering why the strip-space instruction in the importing
document doesn't seem to have precedence over that in the imported document.
does anyone know why i'm getting the results i am and whether there's a way to
force only the importing document's strip-space instruction to be used
(without commenting out or changing anything in the imported document), or
whether adding 'p' to the preserve-space instruction is my best option?

in case it helps, here are the instructions in the importing document:
    <xsl:strip-space elements="abstract ack address annotation app app-group
        array article article-categories article-meta article-title
        author-comment author-notes back bio body boxed-text
        break caption chem-struct chem-struct-wrapper
        citation col colgroup conference contrib contrib-group
        copyright-statement date def def-item def-list
        disp-quote etal fig fig-group fn fn-group front
        gloss-group glossary glyph-ref graphic history hr
        inline-graphic journal-meta kwd-group list list-item
        media mml:math name nlm-citation note notes page-count
        person-group private-char pub-date publisher ref
        ref-list response sec speech statement sub-article
        subj-group supplementary-material table table-wrap
        table-wrap-foot table-wrap-group tbody term tfoot thead
        title-group tr trans-abstract verse-group
        "/>

and the imported document:
  <xsl:strip-space elements="*"/>


thanks a lot!

lynn

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.