I have input XML with this namespace: <?xml version="1.0" encoding="UTF-8"?> < xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > And validate XSL: <xsl:stylesheet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/> <eanucc:despatchAdvice xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eanucc="http://www.????.org/schemas/1.3.1/???" xmlns:C4BE="http://www.???.be/Schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.????.org/schemas/1.3.1/eanucc Des_ld_C4Be_1.xsd"> XSL give me output XML with this order <eanucc:despatchAdvice contentVersion="1.3.1" xmlns:xsd="http:// www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.???.org/ schemas/1.3.1/??? Desadv_ld_C4Be_1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDate="2002-07-01T05:10:10" documentStatus="ACCEPTANCE" xmlns:C4BE="http://www.???.be/Schema" xmlns:eanucc="http://www.????.org/schemas/1.3.1/eanucc" lastUpdateDate="2002-07-01" documentStructureVersion="1.3.1"> Its important to get it in this order <eanucc:despatchAdvice xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eanucc="http://www.???.org/schemas/1.3.1/eanucc" xmlns:C4BE="http://www.????.be/Schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.???.org/schemas/1.3.1/??? Desadv_ld_C4Be_1.xsd" contentVersion="1.3.1" documentStructureVersion="1.3.1" lastUpdateDate="2002-07-01" creationDate="2002-07-01T05:10:10" documentStatus="ACCEPTANCE"> How to order attributes?
heshamelesawy@gmail.com wrote: > How to order attributes? The order of attributes in the XSLT/XPath data model is implementation dependent: http://www.w3.org/TR/xpath-datamodel/#dm-attributes -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
I didn't get your point can i have more clearly answer On Jun 3, 2:37 pm, Martin Honnen wrote: > heshameles...@gmail.com wrote: > > How to order attributes? > > The order of attributes in the XSLT/XPath data model is implementation > dependent:http://www.w3.org/TR/xpath-datamodel/#dm-attributes > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/
heshamelesawy@gmail.com wrote: > I didn't get your point can i have more clearly answer >>> How to order attributes? >> The order of attributes in the XSLT/XPath data model is implementation >> dependent:http://www.w3.org/TR/xpath-datamodel/#dm-attributes You complain about the order of attributes with XSLT but the specification says it is implementation dependent. So I am afraid there is no way to determine the order, an XSLT processor is free to choose any order it likes. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/