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: Thu, 7 Feb 2008 11:32:04 -0800 (PST),    group: microsoft.public.xsl        back       


Simple Question on Special Charaters in Attributes (Newbie)   
Hi all,

I'm trying to select an attribute called xmi:id in an xslt.

<xsl:value-of select="@xmi:d"/>

but won't work with ':' in the select.

Would someone be bale to help me out?

Also, are these known as special characters?


Thanks,

C
date: Thu, 7 Feb 2008 11:32:04 -0800 (PST)   author:   unknown

Re: Simple Question on Special Charaters in Attributes (Newbie)   
What exactly the problem is?
Don't forget to decalre xml namespace:
<xsl:value-of select="@xmi:d" 
xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
-- 
Oleg

conorgaff@gmail.com wrote:
> Hi all,
> 
> I'm trying to select an attribute called xmi:id in an xslt.
> 
> <xsl:value-of select="@xmi:d"/>
> 
> but won't work with ':' in the select.
> 
> Would someone be bale to help me out?
> 
> Also, are these known as special characters?
> 
> 
> Thanks,
> 
> C
date: Fri, 08 Feb 2008 00:08:39 +0200   author:   Oleg Tkachenko

Re: Simple Question on Special Charaters in Attributes (Newbie)   
On Feb 7, 10:08 pm, Oleg Tkachenko  wrote:
> What exactly the problem is?
> Don't forget to decalre xml namespace:
> <xsl:value-of select="@xmi:d"
> xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
> --
> Oleg
>
> conorg...@gmail.com wrote:
> > Hi all,
>
> > I'm trying to select an attribute called xmi:id in an xslt.
>
> > <xsl:value-of select="@xmi:d"/>
>
> > but won't work with ':' in the select.
>
> > Would someone be bale to help me out?
>
> > Also, are these known as special characters?
>
> > Thanks,
>
> > C

Hi Oleg,

When I try to declare the name space I and do the transform I get the
error:

ERROR: Namespace prefix xmi has not been declared

Is this not included in the beginning where I started with:

xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:dyn="http://exslt.org/dynamic"....

<xsl:output method = "xml" encoding = "iso-8859-1" indent="yes" />


Thanks for your help,

C
date: Fri, 8 Feb 2008 03:16:40 -0800 (PST)   author:   unknown

Re: Simple Question on Special Charaters in Attributes (Newbie)   
conorgaff@gmail.com wrote:

> I'm trying to select an attribute called xmi:id in an xslt.
> 
> <xsl:value-of select="@xmi:d"/>
> 
> but won't work with ':' in the select.

You need to bind the prefix 'xmi' to a namespace URI by declaring e.g.
   <xsl:stylesheet
     xmlns:xmi="http://example.org/ex1"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">

Of course you need a different namespace URI than given in my example 
but the right URI obviously depends on your XML input.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Fri, 08 Feb 2008 13:26:05 +0100   author:   Martin Honnen

Re: Simple Question on Special Charaters in Attributes (Newbie)   
On Feb 8, 12:26 pm, Martin Honnen  wrote:
> conorg...@gmail.com wrote:
> > I'm trying to select an attribute called xmi:id in an xslt.
>
> > <xsl:value-of select="@xmi:d"/>
>
> > but won't work with ':' in the select.
>
> You need to bind the prefix 'xmi' to a namespace URI by declaring e.g.
>    <xsl:stylesheet
>      xmlns:xmi="http://example.org/ex1"
>      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>      version="1.0">
>
> Of course you need a different namespace URI than given in my example
> but the right URI obviously depends on your XML input.
>
> --
>
>         Martin Honnen --- MVP XML
>        http://JavaScript.FAQTs.com/

This did the trick

xmlns:xmi="http://www.omg.org/XMI"

Thanks
date: Fri, 8 Feb 2008 07:27:17 -0800 (PST)   author:   unknown

Google
 
Web ureader.com


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