Subject: Re: [xsl] stupid newbie question From: ronald heller <ronald@xxxxxxxxxxx> Date: Tue, 04 Dec 2001 11:23:04 +0100 |
Try this: XML: <document> <title>title</title> <drawing output="filename.jpg"/> <p>paragraph</p> </document>
XSLT: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template>
<!-- default behaviour: <xsl:template match="*"> <xsl:apply-templates/> </xsl:template>
and with templates al you do is change that def. behaviour, so when you only specify a template for that certain element, all other will be processed according to the above template..
more or less anyway... :-) -->
hey all -
i'm new to the list and XSL so this might seem like a silly question (and maybe one that's already been asked a dozen times)...
i need to apply a stylesheet that goes in and changes only one tag in my document. specifically
<drawing output="filename.jpg">
needs to become
<img src="filename.jpg">
like in html. my stylesheet has one single template that does this, but when i apply it, ALL of the other tags in the document disappear. i assume that without a template for a specific tag, my transformer is mapping the other tags to nothing at all. is there a simple way around this? or do i need to make templates for each and every tag that transforms them into the result document as what they were in the source?
thanks in advance for all your help. and apologies if i'm wasting everyone's time.
-greg
----------
the poems to come are for you and for me and are not for most people.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Ronald Heller Technisch Consultant
Coltbaan 27b 3439 NG Nieuwegein Telefoon 030 60 56 675 Telefax 030 60 56 324 Website www.salience.nl ronald@xxxxxxxxxxx Mobiel 06 20 41 25 77 ICQ 135511393
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] stupid newbie question, GregD | Thread | [xsl] Convert string to a list of n, Alexandra Duda |
RE: [xsl] Variable value based on c, Mailer Mailer | Date | Re: [xsl] Mysterious 'invalid chara, Garrick Besterwitch |
Month |