473,408 Members | 2,839 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,408 software developers and data experts.

XSLT extracting certain descendants to higher level outside of ancestor

Hi all,

I'm trying to write a XSL-transformation which converts AI-exported
SVG-Files to be more compatible with firefox. Namely I want to extract
gradients which are declared inside of symbol tags to a higher level.
(https://bugzilla.mozilla.org/show_bug.cgi?id=353575)

i.e.

....
<svg...>
....
<symbol>
...
<...>
...
<linearGradient...>
...
</linearGradient>
...
</...>
...
</symbol>
....
</svg>
....

shall be converted to:

....
<svg...>
....
<linearGradient...>
...
</linearGradient>
<symbol>
...
<...>
...
</...>
...
</symbol>
....
</svg>
....

Is this possible? Even if the descendant I want to extract is no direct
child of symbol?

Thanks,
Ronnie

Oct 27 '06 #1
1 1457
rb****@think-cell.com wrote:
Is this possible? Even if the descendant I want to extract is no direct
child of symbol?
Sure. The template for symbol needs to first find and process
//linearGradient, then process all the other descendants but discard the
linearGradient elements. This presumes that you won't have <svginside
<svg>; that would make things slightly more complicated. Depending on
what you're doing, the template which does the match-and-discard may
need to be under control of a mode, but that may not be true for the
simple case you've described.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ted | last post by:
Was wondering if XSLT alone is appropriate for the following situation. From XML, I'm creating a small website (around 50 pages) with pages that link to each other through a nav menu and a...
9
by: Iain | last post by:
I want to create an XML configuration file which might look like <REGION Name="Europe" WingDing="Blue"> <COUNTRY Name="UK" WingDing="white"> <TOWN Name="London" WingDing="Orange" /> </COUNTRY>...
1
by: Rolf Kemper | last post by:
Dear All, may be some one has a good idea for the follwoing problem. In the xml data below you see a kind of abstract netlist as we use it for chip design. Where the H tag stands for a logical...
12
by: Keith Chadwick | last post by:
I have a fairly hefty XSLT file that for the sake of debugging and clarity I wish to split into some separate sub-templates contained within the same file. The master template calls an...
3
by: Philipp Schumann | last post by:
Hi, I have several nested layers of <node> element that are processed by an XSLT template. Is there any possibility to determine the depth of a node in the overall nesting hierarchy? For...
4
by: dar_imiro | last post by:
Hi, I'm trying to get rid of frames as menu holder in my html-page. I'd also like to separate the menu structure to xml and xslt. Also the actual content is divided to xml and its corresponding...
6
by: aidy | last post by:
Hi, This is a snippet of my XSLT <xsl:for-each select = "SAFS_LOG/LOG_MESSAGE"> <xsl:choose> <xsl:when test="@type = 'FAILED'"> <xsl:variable name="isFailed" select="@type" /> <BR>...
1
by: Harlan Messinger | last post by:
I'm sure this is covered on the Web, but I can't figure out a sufficiently narrow Google query: Suppose I have a hierarchical website structure Page 1 Page 1a Page 1b Page 1b1 Page 1b2 Page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.