Is it possible to exclude an imported xslt library temporarily ?

T

tuka

Hi All,

Is there a way to temporarily suspend the use of imported libraries in
xslt ?

To be precise the issue I am trying to resolve is ,

I have a library imported as
<xsl:import href="Defaults.xsl" /> which strip off html tags like <p>
etc from the acted upon xml.

for ex:
<placeholder id="1016">
<placeholder-content>
<P>test1</P>
<P>test2</P>
</placeholder-content>
</placeholder>


I apply it in the following way

<xsl:if test="string-length(//placeholder[@id='1016']/placeholder-
content)&gt;0">
<div id="suspendedStriping">
<xsl:value-of select="//placeholder[@id='1016']/placeholder-
content" />
</div>
</xsl:if>

I would like to suspend not strip the <p> while I am within this
operation and reactivate when I am out
 
P

Pavel Lepin

tuka said:
Is there a way to temporarily suspend the use of imported
libraries in xslt ?

No. If you use template-based processing, you can sometimes
define a template with higher specificity that matches you
special case. Using modes and/or named templates is an
option as well.
I have a library imported as
<xsl:import href="Defaults.xsl" /> which strip off html
tags like <p> etc from the acted upon xml.

<placeholder id="1016">
<placeholder-content>
<P>test1</P>
<P>test2</P>
</placeholder-content>
</placeholder>

I apply it in the following way

<xsl:if
test="string-length(//placeholder[@id='1016']/placeholder-
content)&gt;0"> <div id="suspendedStriping">
<xsl:value-of
select="//placeholder[@id='1016']/placeholder- content" />
</div>
</xsl:if>

I don't see any template application in this code snippet.
The 'tags' are stripped because you're using xsl:value-of
for some inexplicable reason. What else did you expect?
Want a 3-oz bottle of Pavel's Wonderful Aromatic
De-Confuzzler for just $3.00 (non-refundable, shipping fees
and applicable taxes not included)?
I would like to suspend not strip the <p> while I am
within this operation and reactivate when I am out

Specificity and/or modes, as I said above.
 
T

tuka

Thanks guys,

i was able to solve this a simpler way not requiring using xslt (or at
least reuiring a minor unrelated modification).

Either way I see I will have to study some of the suggestions you gave
as I am unfamiliar with some of it.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top