| re: the reference of the content of XML element
Thanks. I mean how can we deifne this in the schema file? For example,
in the XSD file, set the default value of an element to be the content
from another element??
Thanks!
Joe Kesselman wrote:[color=blue]
> mavis wrote:[color=green]
> > Could you instruct how to refer to another element if it is not key or
> > unique by using xpath?[/color]
>
> An XPath is a description of how to find information within a document
> -- a simple query operation, if you want to look at it that way.
>
> It's up to the environment to say which document; there's no reason your
> system can't use an XPath within a doc to refer to another part of that
> doc. XSLT stylesheets sometimes do exactly this, examining themselves to
> (for example) do a table lookup. In XSLT, any XPath starting with a call
> to the no-arguments version of the document() function is a request to
> search the stylesheet document.
>
> Of course, actually following the XPath to the node it refers to will
> require running an XPath interpreter, giving it the approrpiate context
> information. The TrAX APIs are one semi-standardized way of doing that
> in Java; DOM Level 3 also introduces its own XPath API.
>
> --
> () ASCII Ribbon Campaign | Joe Kesselman
> /\ Stamp out HTML e-mail! | System architexture and kinetic poetry[/color] |