Subject: Re: [xsl] xsl-list question: import precedence with strip-space From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 11 Jan 2010 16:50:23 -0500 |
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),
<xsl:preserve-space elements="*"/> <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 "/>
or whether adding 'p' to the preserve-space instruction is my best option?
-- UBL and Code List training: Copenhagen, Denmark 2010-02-08/10 XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19 XSLT/XQuery/XPath training: San Carlos, California 2010-04-26/30 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl-list question: import pre, Lynn Murdock | Thread | RE: [xsl] xsl-list question: import, Michael Kay |
Re: [xsl] Definite list of XSLT 2.0, Robert Koberg | Date | RE: [xsl] Definite list of XSLT 2.0, Michael Kay |
Month |