[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] unused elements and attributes
In my XSL stylesheet I have created a new namespace called moreover. Is there any way in XSL to create new attributes for all the unused attributes and elements(from the XML doc being passed in)? for example if my XML doc looks like this: <?xml version="1.0" encoding="iso-8859-1" ?> <moreovernews> <article id="_21985527"> <url>http://c.moreover.com/</url> <headline_text>Japan</headline_text> <source>CNET</source> <media_type>text</media_type> <cluster>moreover...</cluster> <tagline /> <document_url>http://news.cnet.com/ </document_url> <harvest_time>Jul 17 2001 6:35AM</harvest_time> <access_registration /> <access_status /> </article> </moreovernews> In my XSL stylesheet, I specifically use <article id>, <url>, <headline_text>, and <harvest_time>. But all the rest I want to put into the new namespace called moreover. so it will look something like: <moreover:source><xsl:value-of select="source"/> </moreover:source> <moreover:media_type><xsl:value-of select="media_type"/></moreover:media_type> ... and so on until all the attributes have been named under moreover. I cannot especifically write out all the unused attributes, because some of them vary depending on what XML document I'm using. Could I do this by saying something like: if element is not <article id>, <url>, <headline_text>, and <harvest_time>, then create new under moreover? Would I be able to do this? and if so, how? thanks alot!! Samina __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|