[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

separating elements/attributes

Subject: separating elements/attributes
From: Samina Islam <samnaz123@xxxxxxxxx>
Date: Tue, 21 Aug 2001 10:05:04 -0700 (PDT)
separating elements
Hi All!

I have this XML document that I am processing through
a XSL stylesheet.  (trying to convert it into PRISM). 
Some of the elements I'm using directly and some I'm
not using.  

My XML document looks like this:
...
<moreovernews>
 <article id="_23174907">
   <url>http://c.moreover.com</url> 
   <headline>Alcoa</headline> 
   <source>Washington Post</source> 
   <media_type>text</media_type> 
   <cluster>moreover...</cluster> 
   <tagline /> 
   <doc_url>http://washingtonpost.com/</doc_url> 
   <time>Aug 11 2001 11:07PM</time> 
   <access_reg /> 
   <access_status /> 
 </article>
...

In my XSL I'm using some of these elements.  this is
part of my stylesheet:

...
<xsl:template match="/*">
  <rdf:RDF>
    <xsl:apply-templates select="article"/>
  </rdf:RDF>
</xsl:template>
		
<xsl:template match="article">
 <rdf:Description> <xsl:attribute 
                    name="rdf:about"><xsl:value-of 
                    select="url"/></xsl:attribute>
   <dc:identifier><xsl:value-of  
      select='@id'/></dc:identifier>
   <dc:title><xsl:value-of 
      select="headline_text"/></dc:title>
   <dc:publisher><xsl:value-of 
      select="source"/></dc:publisher>
   <dc:source><xsl:value-of 
      select="document_url"/></dc:source>    
 </rdf:Description>
</xsl:template>
...


Now for all the "unused" elements/attributes, I want
to do something like this in my stylesheet:

<moreover:tagline><xsl:value-of
      select="tagline"/></moreover:tagline>
<moreover:access_reg><xsl:value-of 
      select="access_reg"/></moreover:access_reg>
<moreover:access_status><xsl:value-of 
     
select="access_status"/></moreover:access_status>

... and so on for thoses I haven't specifically called
before.  

I know that I can write out each of these out (like i
did above), but is there some way of doing this w/out
specially using the names "tagline, access_reg, etc"? 
for all the "unused" elements I just want to put them
into a namespace called moreover.  

I hope that was clear.  

thanks!

Samina


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.