Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » element namespace
element namespace [message #65377] Thu, 15 December 2005 14:20 Go to next message
tatini venkate is currently offline tatini venkateFriend
Messages: 19
Registered: July 2009
Junior Member
Hi

How do I get namespace prefix from each element from my Schema file

My schema is like this

<xstest:schema xmlns:xstest="http://www.w3.org/2001/XMLSchema">
<xstest:element name="fromRole">
<param:complexType>
<xstest:sequence>
<xstest:element name="PartnerRoleDescription">
<xstest:complexType>
<xstest:sequence>
<xstest:element name="GlobalPartnerRoleClassificationCode"
type="xstest:string" minOccurs="0" maxOccurs="4"/>
</xstest:sequence>
</xstest:complexType>
</xstest:element>
</xstest:sequence>
</param:complexType>
</xstest:element>
</xstest:schema>


I should get xstest , param

Please help me How do I get.

Advance Thanks,
Param
Re: element namespace [message #65399 is a reply to message #65377] Thu, 15 December 2005 15:25 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------090209030405010706040508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Param,

You can use this method from XSDConstants:

public static String lookupQualifier(Node node, String namespaceURI)

You can get the node by calling XSDComponent.getElement and you can get
the namespace from XSDElementDeclaration.getTargetNamespace.


param wrote:

> Hi
>
> How do I get namespace prefix from each element from my Schema file
>
> My schema is like this
>
> <xstest:schema xmlns:xstest="http://www.w3.org/2001/XMLSchema">
> <xstest:element name="fromRole">
> <param:complexType>
> <xstest:sequence>
> <xstest:element name="PartnerRoleDescription">
> <xstest:complexType>
> <xstest:sequence>
> <xstest:element
> name="GlobalPartnerRoleClassificationCode" type="xstest:string"
> minOccurs="0" maxOccurs="4"/>
> </xstest:sequence>
> </xstest:complexType>
> </xstest:element>
> </xstest:sequence>
> </param:complexType>
> </xstest:element>
> </xstest:schema>
>
>
> I should get xstest , param
> Please help me How do I get.
>
> Advance Thanks,
> Param



--------------090209030405010706040508
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Param,<br>
<br>
You can use
Re: element namespace [message #597346 is a reply to message #65377] Thu, 15 December 2005 15:25 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 26287
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090209030405010706040508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Param,

You can use this method from XSDConstants:

public static String lookupQualifier(Node node, String namespaceURI)

You can get the node by calling XSDComponent.getElement and you can get
the namespace from XSDElementDeclaration.getTargetNamespace.


param wrote:

> Hi
>
> How do I get namespace prefix from each element from my Schema file
>
> My schema is like this
>
> <xstest:schema xmlns:xstest="http://www.w3.org/2001/XMLSchema">
> <xstest:element name="fromRole">
> <param:complexType>
> <xstest:sequence>
> <xstest:element name="PartnerRoleDescription">
> <xstest:complexType>
> <xstest:sequence>
> <xstest:element
> name="GlobalPartnerRoleClassificationCode" type="xstest:string"
> minOccurs="0" maxOccurs="4"/>
> </xstest:sequence>
> </xstest:complexType>
> </xstest:element>
> </xstest:sequence>
> </param:complexType>
> </xstest:element>
> </xstest:schema>
>
>
> I should get xstest , param
> Please help me How do I get.
>
> Advance Thanks,
> Param



--------------090209030405010706040508
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Param,<br>
<br>
You can use
Previous Topic:element namespace
Next Topic:Attribute vs element in XML serialization
Goto Forum:
  


Current Time: Sun Dec 21 18:42:34 GMT 2014

Powered by FUDForum. Page generated in 0.10415 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software