I’m a newbie at XSL / XML. I would like to make a simple XSL of the below XML code, that just shows the attributes name and adress? I have most of the XSL but I can’t write the part where it shows my results (the customers).
This is the XML code:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="customer.xsl"?>
<customers xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="customer.xsd">
<customer name="Jay Z" address="New York, trinity st. 300, USA"/>
<customer name="Vladimir Putin" address="St. Petersburg, wadim street 23, Russia"/>
<customer name="Hiro Nakamura" address="Kyoto, Natsukawa street 49, Japan"/>
</customers>
Like this?
<xsl:value-of select="customers/customer"/>
Any help will be much appreciated! Thank you.
The XSL itself would look like the following:
This code as working example
For a more detailed example look at this