|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: What is a document?
Don Park wrote > You quoted me out of context. The paragraph you quoted was a > reply to the following paragraph which clearly points out that > the context of the discussion was the need for a fragment to > impose constraint on its container: I suspected as much - that's why I also asked the question which you answer below. > Written by somebody, I forget who (sorry): > >I wouldn't impose such a limitation myself. Why should the fragment > >'know' anything about its container? (If I understand you correctly - > >and apologies if I don't.) Provided it has its namespace declaration > >then it can in theory exist in any container that will have it. That was me. > Imagine a repository of XSLT templates which is used by XSL editors > to construct a XSLT document in a top-down fashion. Select an element > in the source tree and you will see a list of templates that can be > applied. Most likely not all templates will be appropriate for > insertion. Note that each XSLT templates are, in fact, XML fragments. > This is an example of constraints an XML fragment might impose on its > container. > > Another example is an e-wallet which holds private information. When > a service requires some bits of information and the owner of > the wallet > approves, wallet sends the information in XML. Requesting service > defines the format it wants dynamically using a format similar to a > form and the wallet injects necessary information as if it was filling > out the form. If a wire-transfer directions must be sent, it can not > be just dropped into any location in the outgoing message. While this > problem can be solved in other ways, suppose I find it ideal to have > this 'constraint' encoded into each item in the wallet for > extensibility. Again, this is an example of constraints an > XML fragment > might impose on its container. > > Are we in sync? Yes. I think both of these are very good examples, but I think that the information you desire could not be in the fragment itself. The reason I used the example of returning one node in my previous message was because it raises the question "where would you put these restrictions?" I think both of your examples are application specific, and so would require a specific solution. The discussion about fragments and so on is a general solution that could be applied across all XML. (As it happens I think you could do the XSL editor one with a dynamic schema that your editor understood. As you edit the document and add nodes you can modify the schema. As you get to each node you can present a list of valid children - from the schema.) Regards, Mark xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








