Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Tue, 3 Jun 2008 05:30:22 -0700 (PDT),    group: microsoft.public.xsl        back       


How to order attributes??   
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?
date: Tue, 3 Jun 2008 05:30:22 -0700 (PDT)   author:   unknown

Re: 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/
date: Tue, 03 Jun 2008 14:37:23 +0200   author:   Martin Honnen

Re: How to order attributes??   
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/
date: Tue, 3 Jun 2008 07:12:41 -0700 (PDT)   author:   unknown

Re: How to order attributes??   
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/
date: Tue, 03 Jun 2008 16:55:39 +0200   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us