|
Subject: [xsl] xsl-list question: import precedence with strip-space From: "Lynn Murdock" <lmurdock@xxxxxxxx> Date: Mon, 11 Jan 2010 13:42:34 -0800 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Definite list of XSLT 2.0, Vyacheslav Sedov | Thread | Re: [xsl] xsl-list question: import, G. Ken Holman |
| Re: [xsl] Definite list of XSLT 2.0, Abel Braaksma | Date | Re: [xsl] Definite list of XSLT 2.0, Robert Koberg |
| Month |