[xsde-users] xsde xpath generation
Sia Jeffry Saputra
ssaptura at sta.samsung.com
Tue Jan 31 13:35:24 EST 2012
Hi Boris,
Actually, I was talking about the other way around..
>From an existing object model, we want to select a node and then generate XPATH expression for that node.
Probably to clear things up, the scenario I was trying to solve is like below:
For example: both server and client have book schema.
1. Client has book data and corresponding data object called book object.
Example:
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
2. Client modified the book's object above. Let say year 2005 to 2010
3. The server has interface to access a particular node, so instead of replacing the whole book, we can use xpath to change particular node.
Like eg: request ("book/year", 2010);
4. So since the client side is working on the data object book.
It can change it with book.year = 2010 and then store it locally.
5. But to modify the server, I am just wondering is there any method to have something like giving the node as parameter and return the generated xpath query?
Something like: xpathquery = foo (book.year); which will return the "book/year" query so I can construct the request to server accordingly.
Thanks,
---
Jeff
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Tuesday, January 31, 2012 8:00 AM
To: Sia Jeffry Saputra
Cc: 'xsde-users at codesynthesis.com'
Subject: Re: [xsde-users] xsde xpath generation
Hi Jeff,
Sia Jeffry Saputra <ssaptura at sta.samsung.com> writes:
> I am wondering is there any method in xsde to do xpath expression
> generation for a node in a particular object model??
I am not sure what you mean by this. If you want to access nodes in the object model using XPath expressions, then, no, this is not supported in XSD/e. Generally, XPath is an interpretive technology and as a result normally too "heavy-weight" for mobile/embedded applications. XSD, on the other hand, does support this feature.
Boris
More information about the xsde-users
mailing list