XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Evan DriscollSubject: If something is within a tag
Author: Evan Driscoll
Date: 04 Apr 2007 07:56 PM
Hi, I'm new to both the forums and XSLT. I'm trying to put <h4> around anything that is inside of a "<smallheader>" tag. I've tried some different things, but I couldn't figure out how to "scan" through another tag to find every <smallheader> tag.

Postnext
Tony LavinioSubject: If something is within a tag
Author: Tony Lavinio
Date: 04 Apr 2007 08:17 PM
Use an identity transformation, and add a new template
that sees the element you want and emits it wrapped in
the other element.

Search on Google for XSLT identity transformation for
lots of examples.

Postnext
Evan DriscollSubject: If something is within a tag
Author: Evan Driscoll
Date: 04 Apr 2007 08:41 PM
Thanks, but I'm not sure if that will do what I want. The XSLT is being brought into a PHP file and I need anything within <smallheader> to be a <h4> html element. The examples I saw seemed to just change make new XML tags.

Postnext
Tony LavinioSubject: If something is within a tag
Author: Tony Lavinio
Date: 06 Apr 2007 12:32 AM
No, I think the identity transform is just what you need.
See attached sample document and transform.


Unknownevan.xml
Sample document

Unknownevan.xsl
Indentity transform with override

Posttop
Evan DriscollSubject: If something is within a tag
Author: Evan Driscoll
Date: 06 Apr 2007 12:56 PM
Thank you so much for the example.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.