Altova Mailing List Archives


[xsl] unused elements and attributes

From: Samina Islam <samnaz123@--------->
To:
Date: 7/20/2001 6:07:00 AM
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

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.