HI
Can anyone tell me how to have my xslt file include <?xml version="1.0" culture="utf-8"?> in the output xml file as it's not included in the source document received from a third party?
The following is my xslt file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
utput indent="yes"/>
<xsl:template match="/">
<Vehicles>
<xsl:apply-templates />
</Vehicles>
</xsl:template>
<xsl:template match="Vehicle">
<Vehicle>
<DealerID><xsl:value-of select="VsDealerRefNum" /></DealerID>
<Style></Style>
<Make><xsl:value-of select="Make" /></Make>
<Model><xsl:value-of select="Model" /></Model>
<Derivative><xsl:value-of select="Range" /></Derivative>
<NumGears></NumGears>
<NumCylinders></NumCylinders>
<BodyType></BodyType>
<FuelType><xsl:value-of select="Fuel" /></FuelType>
<NumDoors></NumDoors>
<NumSeats></NumSeats>
<GearBoxType><xsl:value-of select="Transmission" /></GearBoxType>
<InsuranceGroup><xsl:value-of select="InsuranceGroup" /></InsuranceGroup>
<SellingPrice><xsl:value-of select="RetailPrice" /></SellingPrice>
<Mileage><xsl:value-of select="Mileage" /></Mileage>
<CC><xsl:value-of select="EngineCC" /></CC>
<Registration><xsl:value-of select="Registration" /></Registration>
<VinNo></VinNo>
<Notes><xsl:value-of select="ShortDescription" /></Notes>
<Options>
<xsl:apply-templates select="Options" />
</Options>
<SerialEquipment></SerialEquipment>
<Images>
<xsl:apply-templates select="Images" />
</Images>
<VehicleImportID></VehicleImportID>
</Vehicle>
</xsl:template>
<xsl:template match="Options">
<xsl:for-each select="Option">
<Option>
<OptionCode><xsl:value-of select="Code" /></OptionCode>
<OptionDescription><xsl:value-of select="Description" /></OptionDescription>
<IsAssigned>1</IsAssigned>
</Option>
</xsl:for-each>
</xsl:template>
<xsl:template match="Images">
<xsl:for-each select="Image">
<Image>
<ImageID></ImageID>
<ImageData><xsl:value-of select="Fullsize" /></ImageData>
<IsPrimaryImage></IsPrimaryImage>
</Image>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thanks for any help.
Smeat
Can anyone tell me how to have my xslt file include <?xml version="1.0" culture="utf-8"?> in the output xml file as it's not included in the source document received from a third party?
The following is my xslt file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
<xsl:template match="/">
<Vehicles>
<xsl:apply-templates />
</Vehicles>
</xsl:template>
<xsl:template match="Vehicle">
<Vehicle>
<DealerID><xsl:value-of select="VsDealerRefNum" /></DealerID>
<Style></Style>
<Make><xsl:value-of select="Make" /></Make>
<Model><xsl:value-of select="Model" /></Model>
<Derivative><xsl:value-of select="Range" /></Derivative>
<NumGears></NumGears>
<NumCylinders></NumCylinders>
<BodyType></BodyType>
<FuelType><xsl:value-of select="Fuel" /></FuelType>
<NumDoors></NumDoors>
<NumSeats></NumSeats>
<GearBoxType><xsl:value-of select="Transmission" /></GearBoxType>
<InsuranceGroup><xsl:value-of select="InsuranceGroup" /></InsuranceGroup>
<SellingPrice><xsl:value-of select="RetailPrice" /></SellingPrice>
<Mileage><xsl:value-of select="Mileage" /></Mileage>
<CC><xsl:value-of select="EngineCC" /></CC>
<Registration><xsl:value-of select="Registration" /></Registration>
<VinNo></VinNo>
<Notes><xsl:value-of select="ShortDescription" /></Notes>
<Options>
<xsl:apply-templates select="Options" />
</Options>
<SerialEquipment></SerialEquipment>
<Images>
<xsl:apply-templates select="Images" />
</Images>
<VehicleImportID></VehicleImportID>
</Vehicle>
</xsl:template>
<xsl:template match="Options">
<xsl:for-each select="Option">
<Option>
<OptionCode><xsl:value-of select="Code" /></OptionCode>
<OptionDescription><xsl:value-of select="Description" /></OptionDescription>
<IsAssigned>1</IsAssigned>
</Option>
</xsl:for-each>
</xsl:template>
<xsl:template match="Images">
<xsl:for-each select="Image">
<Image>
<ImageID></ImageID>
<ImageData><xsl:value-of select="Fullsize" /></ImageData>
<IsPrimaryImage></IsPrimaryImage>
</Image>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thanks for any help.
Smeat