Re: newbie, help

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You use an @ to read attributes, so @age


lasalsatx@xxxxxxxxxxxxxxxxx wrote:
on the following example I need to find the way of passing age property from
the xml using xslt to the output xhtml.

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="family.xsl"?>
<family>
<person>
<given-name age="10">Fred</given-name>
<family-name>Smith</family-name>
</person>
<person>
<given-name age="13">Jill</given-name>
<family-name>Jones</family-name>
</person>
</family>
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="person">
<p>
<xsl:value-of select="given-name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="family-name"/>
</p>
</xsl:template>
Output<?xml version="1.0" encoding="UTF-16"?>
<p>Fred Smith</p>
<p>Jill Jones</p>thanks in advance,Vic

.



Relevant Pages

  • newbie, help
    ... on the following example I need to find the way of passing age property from ... the xml using xslt to the output xhtml. ...
    (microsoft.public.dotnet.xml)
  • Re: Using PHP to parse specific XML tag content?
    ... XML --> HTML transformation in testing environment. ... run just fine under Windows using Cygwin, and, unless I'm ... but you have to learn XSLT or use whatever defaults ...
    (comp.lang.php)
  • Subject: ANN: 4Suite XML 1.0b2
    ... 4Suite XML - XML, XPath, XSLT, related technologies and support ... 4Suite RDF - RDF processing libraries and stand-alone DBMS ...
    (comp.lang.python.announce)
  • EditiX 2.1 - XML Editor & XSLT Debugger
    ... We are glad to announce the availability of EditiX 2.1. ... cross-platform and easy to use XML Editor and XSLT Debugger designed to ... New docking windows for the XSLT Editor ...
    (comp.lang.java.softwaretools)
  • Re: What is/is not considered to be good OO programming
    ... Brit programmers have common sense, ... XSLT is overblown and introduces ... Then your guys haven't learnt how to use XSL properly. ... > but XML, then use XSLT to style this output for the end user. ...
    (comp.lang.php)