xsl-list
[Top] [All Lists]

RE: Getting values

2003-05-29 23:08:10
Hi,

[snip]

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)

You can go about it like this, but this is definately the way you should do it 
with XSLT. Here you're trying to generate start and end-tags by basically 
writing text, but in XSLT when you want to generate XML you generate a Result 
Tree and then let the engine to serialize it; have you read the XSLT spec or a 
tutorial? Anyhow, the above should be something like

  <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="{html/head/meta[(_at_)name='DC.Source']/@content}">

Cheers,

Jarno - E-Craft: Embryonic (Remix)

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



<Prev in Thread] Current Thread [Next in Thread>
  • RE: Getting values, Jarno . Elovirta <=