Hey,
I don't use PHP for XML a lot but I have a project where I need to do a lot of XSLT transformations. The first one I setup worked great.
The second one... not so much.
Here is what is happening, picture this:
XML:
XSL:
Now, the output is this:
That's right... it is outputing the original XML, with formatting still in place, but no tags.
What in the world could cause something like this?
Thanks
Travis Hawkins
I don't use PHP for XML a lot but I have a project where I need to do a lot of XSLT transformations. The first one I setup worked great.
The second one... not so much.
Here is what is happening, picture this:
XML:
Code:
<data>
<customer>
<name>My Name</name>
<address>My Address</name>
<phone>5055550505</phone>
</customer>
</data>
Code:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] version="1.0">
<xsl:template match="/">
<xsl:apply-templates select="Data/Customer"/></xsl:template>
<xsl:template match="/Customer">
<Format>
<BuildThis>
<xsl:value-of select="name"/> - <xsl:value-of select="phone"/>
</BuildThis>
</Format>
</xsl:template>
</xsl:stylesheet>
Now, the output is this:
Code:
My Name
My Address
5055550505
That's right... it is outputing the original XML, with formatting still in place, but no tags.
What in the world could cause something like this?
Thanks
Travis Hawkins