Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » how to modify the XSD using the Xpath
how to modify the XSD using the Xpath [message #582532] Tue, 13 January 2004 02:18
Eclipse UserFriend
HI all,

Can any one help me to solve the problem of
solving this problem
listed below..

1)My requirement is to modify the XSD file by using
the XPath.
2)XPath will be in terms of the element name and
not it terms of element.

for Example

The XSD file will look like this

<xs:complexType name=" AuthorsType ">

<xs:attribute name="Name" type="xs:string" use="required"/>

</xs:complexType>


<xs:element name="BookType">
<xs:complexType >

<xs:sequence>

<xs:element ref="Name"/>

<xs:element name="Authors" type="AuthorsType"/>

<xs:element ref="ISBN"/>

<xs:element ref="Publisher"/>

<xs:element ref="Shelf"/>

</xs:sequence>

</xs:complexType>
</xs:element >
<xs:element name="BookStore">

<xs:complexType>

<xs:sequence>

<xs:element ref="BooksType"/>

<xs:element name="Novels" type="NovelsType"/>

<xs:element name="Magazines" type="MagazinesType"/>

</xs:sequence>

</xs:complexType>

</xs:element>



Xpath will be BookStore/BooksType/AuthorType/@name that means BookStore
contains Books of type BooksType and BooksType contains Authors of type
AuthorsType



In the AuthorsType I want to change this attribute of use to optional
<xs:attribute name="Name" type="xs:string" use="required"/>
Previous Topic:use="required"/use="optional"
Next Topic:how to find the element that is refered using ref attribute.
Goto Forum:
  


Current Time: Thu Jul 03 07:06:54 EDT 2025

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

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

Back to the top