473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Is it possible to exclude an imported xslt library temporarily ?

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
3 1828
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: blabla120 | last post by:
Hello, I have a source file with <StartEvent starttime="2006-04-19T20:15:00Z"/> I want to transform it with XSLT into <Starttime>2006-04-21T20:15:00Z</Starttime>
1
by: Ganesh Muthuvelu | last post by:
Hello all, I want to exclude one node (element alone) but copy all of the other elements. This is the XSLT I have. I want to exclude the "alias" element alone but it does not work.. Can...
4
by: Samuel R. Neff | last post by:
I'm writing an xslt in vs.net 2003 and in order to get intellisense on the html content I added the default namespace declaration xmlns="http://schemas.microsoft.com/intellisense/ie5". However,...
10
by: Simon Brooke | last post by:
I'm struggling to understand what 'exclude-result-prefixes' does and is for; the language of the standard http://www.zvon.org/xxl/XSLTreference/W3C/xslt.html#literal-result-element is not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.