|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] separating elements/attributes
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
|
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
|

Cart








