Link to home
Start Free TrialLog in
Avatar of royalcyber
royalcyber

asked on

How to create an increment variable in XSLT

Hi

Attached please find the XML and XSLT file. In the XSLT file i need to concatenate an increment number such as

<xsl:attribute name = "geonode_id" >@geonode_1<xsl:attribute>

<xsl:attribute name = "geonode_id" >@geonode_2<xsl:attribute

etc.

How can i get increment value. Also currently when i run this XSLT i get the exception
" Cannot have a DOCTYPE decleration outside of a prolog"

Any help will be greatly appreciated

Thanks
storeloc.xsl
store-load.xml
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

for the DTD you need to set a serialisation expressed in the xsl:output element
<xsl:output doctype-system="storeload.dtd"/>

<xsl:template match= "/" >
	<xsl:element name = "import" >
		<xsl:apply-templates/>
	</xsl:element>
</xsl:template>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if all you need to do for an element is lowercasing the attribute names, there is a better way, tell me and I will show you
Avatar of royalcyber
royalcyber

ASKER

didn't resolve my problem
well, I gave you all teh explanation I could give based on your input.
You could have asked for a clarification