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

Getting values

Subject: Getting values
From: "Sergio Lorenzo" <negpfe@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 May 2003 20:15:53 +0200
xsl getting values
Thanks. In fact, I would like to parse the following HTML file:

<html>

    <head>

        <meta name ="Embassy of the US in Caracas, Venezuela"/>

        <meta name = "DC.Title" content = "Polycyclic aromatic hydrocarbon
contamination"/>

        <meta name = "dc.Creator" content = "Gogh, Vincent van"/>

        <meta name = "DC.Source" content = "http://a.b.org/manon/"/>

</head>

</html>





And I would like the output was:



<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.0/"
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#">

    <rdf:Description rdf:about="http://a.b.org/manon/">
<------------------------------------------------    I'M GETTING PROBLEMS TO
GET THIS VALUE



        <dc:Title>Polycyclic aromatic hydrocarbon contamination</dc:Title>

        <dc:Creator>Gogh, Vincent van</dc:Creator>









So, my XSLT engine is like following



<?xml version="1.0" encoding="UTF-8"?>

    <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

        <xsl:template match="/">



            <xsl:text disable-output-escaping="yes">&lt;</xsl:text>rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.0/"
xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"<xsl:text
disable-output-escaping="yes">&gt;</xsl:text>

             <xsl:text
disable-output-escaping="yes">&#13;&#10;&#9;&lt;</xsl:text>rdf:Description
rdf:about="           <----------------------- I WOULD LIKE TO GET THE VALUE
OF @content (in DC.Source)

          <xsl:apply-templates/>

        </xsl:template>

        <xsl:template match="meta">

            <xsl:if test="starts-with(@name,'DC.') or
starts-with(@name,'dc.')">

                <xsl:text
disable-output-escaping="yes">&lt;</xsl:text>dc:<xsl:value-of
select="substring-after(@name,'.')"/><xsl:text
disable-output-escaping="yes">&gt;</xsl:text>

                <xsl:apply-templates select="@content"/>

                <xsl:text
disable-output-escaping="yes">&lt;&#47;</xsl:text>dc:<xsl:value-of
select="substring-after(@name,'.')"/>

                <xsl:text disable-output-escaping="yes">&gt;</xsl:text>

            </xsl:if>

    </xsl:template>

</xsl:stylesheet>







Comments are in capital letters.

I don't know the way to get that value (http://a.b.org/manon/). Does any one
know how to parse it in the position above explained? Thanks a lot.


 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.