timbrown Posted June 12, 2007 Share Posted June 12, 2007 Hello, I though I had fixed this one but oh no! something.xml <app> <id>app1</id> </app> something.xsl <xsl:template match="app"> <div><xsl:apply-templates/></div> </xsl:template> <xsl:template match="id"> <xsl:attribute name="id"> <xsl:value-of select="."/> </xsl:attribute> </xsl:template> in IE this outputs something like - <div id="app1"></div> but when I use php XSLTProcessor I get the message - "Cannot add attributes to an element if children have already been added to the element". Help! I have been struggling with this... Link to comment https://forums.phpfreaks.com/topic/55262-xsltprocessor-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.