Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumshow to modify the XSD using the Xpath
https://www.eclipse.org/forums/index.php/mv/msg/11446/35522/#msg_35522
Originally posted by: mmahesh.firstam.com
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.
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"/>]]>2004-01-13T07:18:30-00:00Re: how to modify the XSD using the Xpath
https://www.eclipse.org/forums/index.php/mv/msg/11446/582663/#msg_582663
You could write a code that walks through the xsd model and puts your
xpath as key and the corresponding element / attribute as the object
inside a map object. I dont think there is anything available to do this
ready made.
Subsequently you could fetch the elemnt/attribute from the xpath.
Me and a friend have made something similar its not thoroughly tested (and
it does not work properly under certain scenarios such as when the com pex
type is extended by extension element)and we are interested only in read
access and not in modifying the xsd.
mahesh wrote:
> 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.
> 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"/>]]>Raster R2004-01-14T06:32:15-00:00Re: how to modify the XSD using the Xpath
https://www.eclipse.org/forums/index.php/mv/msg/11446/35729/#msg_35729
Originally posted by: crscc.bol.net.in
Let me make an attempt in answering your query.
You could write a code that walks through the xsd model and puts your
xpath as key and the corresponding element / attribute as the object
inside a map object. I dont think there is anything available to do this
ready made.
Subsequently you could fetch the elemnt/attribute from the xpath.
Me and a friend have made something similar its not thoroughly tested (and
it does not work properly under certain scenarios such as when the com pex
type is extended by extension element)and we are interested only in read
access and not in modifying the xsd.
mahesh wrote:
> 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.
> 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"/>]]>2004-01-14T06:32:15-00:00