Click here to Skip to main content
15,908,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello All,

I am having xml file :
XML
<?xml version="1.0" encoding="utf-8"?>
<Element>
<Order xmlns="urn:schemas-basda-org:2000:purchaseOrder:xdr:3.01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-basda-org:2000:purchaseOrder:xdr:3.01 http://www.ebis-xml.ner/schemas/order-v3.vsd"/>
<OrderHead>
<Schema>
<Version></Version>
</Schema>
<Parameters>
<Language></Language>
<DecimalSeparator></DecimalSeparator>
<Precision></Precision>
</Parameters>
<OrderType Code="BLO"/>
<OrderCurrency>
<Currency Code="GBP"></Currency>
</OrderCurrency>
<Checksum/>
</OrderHead>
<OrderReferences>
<ContractOrderReference>
<PurchaseElement Customer_Code="181,053"/>
</ContractOrderReference>
<BuyersOrderNumber Preserve="true"/>
<SuppliersOrderReference Preserve="true">
<PurchaseElement Purchase_Order_Number="P1130351"/>
</SuppliersOrderReference>
</OrderReferences>
<OrderDate/>
<Supplier>
<SupplierReferences>
<BuyersCodeForSupplier/>
<GLN/>
</SupplierReferences>
<Party/>
<Address>
<Street/>
<Street/>
<City/>
<State/>
<PostCode/>
<Country Code="GB"></Country>
</Address>
</Supplier>
<Delivery>
<PreferredDate>
<PurchaseElement Delivery_Date="03.27.03"/>
</PreferredDate>
<SpecialInstructions>
<PurchaseElement Ship_Date="03.26.03"/>
</SpecialInstructions>
</Delivery>
<OrderLine TypeCode="GDS" Action="Add" TypeDescription="Goods & Services">
<LineNumber Preserve="true"/>
<OrderLineReferences>
<ContractOrderReference/>
<CostCentre/>
</OrderLineReferences>
<Product>
<SuppliersProductCode/>
<BuyersProductCode/>
<TradedUnitCode/>
<ConsumerUnitCode/>
<Description/>
<Properties>
<Length UOMCode="CMT" UOMDescription="Centimetre"/>
<Width UOMCode="CMT" UOMDescription="Centimetre"/>
<Color/>
</Properties>
</Product>
<Quantity UOMCode="PCE" UOMDescription="Piece">
<Packsize/>
<Amount>
<PurchaseElement Quantity="190"/>
</Amount>
</Quantity>
<Price UOMCode="PCK" UOMDescription="Pack">
<Units/>
<UnitPrice/>
</Price>
<LineTotal/>
<Delivery>
<PreferredDate/>
</Delivery>
<Narrative/>
</OrderLine>
</Element>


i want to generate xsl on above format of xml.
thanks in advance...
Posted
Comments
Sandeep Mewara 27-Sep-12 12:17pm    
And? What have you tried so far? Where are you stuck?

Something like this: XSL Code Generator[^]?
 
Share this answer
 
Comments
netrasw 27-Sep-12 8:42am    
thanks for reply.
I am not looking for generate code i want pure xsl file to be generate.
Thanks.
Zoltán Zörgő 27-Sep-12 8:44am    
You want to generate xml schema (XSD) from a given xml file? This is a one-time task?
Generally you can't automatically generate XSL.
Xsl is basically a set of rules or instructions how to transform one xml to another one.
So you have to write it manually, and to do so you need to know both how original xml looks like
and how transformed xml should look like.

You can find good basic tutorial here[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900