By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,495 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,495 IT Pros & Developers. It's quick & easy.

Is it possible to exclude an imported xslt library temporarily ?

P: n/a
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 <pwhile I am within this
operation and reactivate when I am out

Aug 9 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Easiest solution I can think of would be to use modes.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Aug 9 '07 #2

P: n/a

tuka <tu**@yorn.netwrote in
<11********************@q75g2000hsh.googlegroups.c om>:
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 <petc 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 <pwhile I am
within this operation and reactivate when I am out
Specificity and/or modes, as I said above.

--
"Patience is a minor form of despair, disguised as
virtue." -- Ambrose Bierce
Aug 10 '07 #3

P: n/a
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.

Aug 10 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.