|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
help request from noviceHi,
I have been trying to combine an xml(rdfcat1.xml which includes temp.xml in my case) with xsl (rdfcat.xsl ) but am receiving the following runtime error in my xsl: Attribute nodes must be added before any child nodes to the element. <xsl:template match="@*|node()"> <!-- ERROR POINTS TO THIS LINE--!> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> I have attached my files. Please someone help me. Thanks Anand rdfcat1.xmlrdfcat.xsltemp.xml |
|
|
Re: help request from novicePlease ask XSLT specific questions at, http://www.mulberrytech.com/xsl/xsl-list/index.html. The discussions there are more focused towards XSLT. But I'll try to answer your question. My question to you is - which XSLT processor are you using? I cannot find way to use XInclude functionality with either Xalan-J or Saxon. But nonetheless, I can transform temp.xml with rdfcat.xsl. And I get the error you are saying. So, definetely there is a problem with the stylesheet, rdfcat.xsl. The problem is with the template, <xsl:template match="*[@rdf:about]">. You cannot have <xsl:apply-templates select="@* at the position, where it is now. Either you rewrite this template as, <xsl:template match="*[@rdf:about]"> <rdf:Description rdf:about="{@rdf:about}"> <rdf:type> <owl:Class rdf:about="{namespace-uri(.)}{local-name()}"/> </rdf:type> <xsl:apply-templates select="node()"/> </rdf:Description> </xsl:template> or, <xsl:template match="*[@rdf:about]"> <rdf:Description rdf:about="{@rdf:about}"> <xsl:apply-templates select="@*" /> <rdf:type> <owl:Class rdf:about="{namespace-uri(.)}{local-name()}"/> </rdf:type> <xsl:apply-templates select="node()"/> </rdf:Description> </xsl:template> On 4/13/07, catchope <annamalay@...> wrote: > > Hi, > I have been trying to combine an xml(rdfcat1.xml which includes > temp.xml in my case) with xsl (rdfcat.xsl ) but am receiving the following > runtime error in my xsl: > > Attribute nodes must be added before any child nodes to the element. > > > <xsl:template match="@*|node()"> > <!-- ERROR POINTS TO THIS LINE--!> > <xsl:copy> > <xsl:apply-templates select="@*|node()"/> > </xsl:copy> > </xsl:template> > I have attached my files. > > > > Please someone help me. > Thanks > Anand > > http://www.nabble.com/file/7858/rdfcat1.xml rdfcat1.xml > http://www.nabble.com/file/7859/rdfcat.xsl rdfcat.xsl > http://www.nabble.com/file/7860/temp.xml temp.xml -- Regards, Mukul Gandhi |
| Free embeddable forum powered by Nabble | Forum Help |