This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
unused elements and attributes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] unused elements and attributes
- From: Samina Islam <samnaz123 at yahoo dot com>
- Date: Fri, 20 Jul 2001 07:02:40 -0700 (PDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
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