[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: URI Design

  • To: xml-dev@l...
  • Subject: Re: URI Design
  • From: "M. David Peterson" <m.david.x2x2x@g...>
  • Date: Thu, 21 Apr 2005 10:06:40 -0600
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sQAqVsAdIJ6WOamnb3jRb0YS73vQtU1OinEBB5SUYqx7L58yWJYwPXcySLNQOicPUQDL7ZZ2K8wZd6MZT7U18JVlkUIvImCOopE1G9PsPgqyeANL01RRw4KdKvwoX64FdKpyLuYtOyKVF3BUQb0SPcUGAIleqBVDwVlsmBaxP9o=
  • In-reply-to: <f8da4eba050421090268a1e1f5@m...>
  • References: <20050421152930.GE29144@m...> <f8da4eba050421090268a1e1f5@m...>
  • Reply-to: "M. David Peterson" <m.david.x2x2x@g...>

c uri
Oh, in those sample XML sets the test would be to check for 'element'
children or possibly any child element that contains any number of
text() nodes to then evaluate to true, otherwise false and contiue to
step through if there are child elements to step through to.

On 4/21/05, M. David Peterson <m.david.x2x2x@g...> wrote:
> Hey, this is pretty cool.  In my opinion and in answer to your
> hierarchical question the time to use a generalogical structure as
> part of your XML-based language is if you plan to use these
> relationsips as a way of enforcing an implied set of logical
> processing rules.  For example, if there is no child element "doThis"
> then obviously this method is not available for that portion of your
> code base... quick and dirty error checking.  You can also make nested
> structure that will step through to each child element until it
> evaluates to true (based on whatever you are testing for. e.g. using
> the value of the data and the  name() or local-name() of the element
> to determine the name of a sequence that should then be invoked to
> properly the child elements of the parents name value being tested.
> An example of each of the XML trees for something like this might look
> like:
> 
> Data being processed:
> 
> <foo>
>    <bar>
>      <element>data</element>
>      <element>data</element>
>    </bar>
> </foo>
> 
> Data its being compared against:
> 
> <foo true-sequence="seq1">
>    <bar true-sequence="seq2"/>
> </foo>
> 
> Sequence definition file:
> 
> <sequence id="seq1">
>    <do_this/>
>    <then_this/>
>    <if_this>
>        <do_this/>
>    </if_this>
> </sequence>
> 
> Using this type of dynamic application construction can be really
> powerful and as long as you seperate the XML definition files out into
> seperate files, allowing only elements and data that are there serving
> the same purpose (e.g. to invoke a processing sequence) then I think
> you will find this a simple way to maintain decent code readability as
> well as the ability to use the structure viewing tools contained
> within the tools we use an extremely powerful way to view whats taking
> place in your code without having to scan a 2000 line file up and down
> looking for this sequence or that sequence, etc...
> 
> I really like your chosen style. I would be interested in seeing how
> this continues to develop for my own learning so please keep us up to
> date, or if you would prefer, just those of us who want to watch by
> creating an Atom feed that we can subscribe to.
> 
> Cheers :)
> 
> On 4/21/05, Alan Gutierrez <alan-xml-dev@e...> wrote:
> >     I'm working on my XML pipeline engine, Relay. I'm using special
> >     URIs to view information as documents. I'm creating a servlet,
> >     for example, that explodes the HttpServletRequest into a
> >     document, so I can bite into it with XSLT.
> >
> >     <request>
> >       <path-info>/foo/bar</path-info>
> >       <server-name>engrm.com</server-name>
> >       <content-type>application/x-www-form-urlencoded</content-type>
> >       <content-uri>request://content/</content-uri>
> >     </request>
> >
> >     The above document is available from the URI:
> >
> >     request://document/
> >
> >     As you can see, I get the input as a stream using:
> >
> >     request://content/
> >
> >     I parse the content of the post in a Relay, and it makes each
> >     form field avaialable as a stream, in case one of the fields is
> >     really a hidden field with an JavaScript generated XML document in it.
> >
> >     Or, else, I can run a textarea through HTML Tidy, to permit mild
> >     markup in a comments box.
> >
> >     That URI looks like:
> >
> >     request://field/e-mail-address/1
> >
> >     Which will return the first field named e-mail-address as a
> >     stream.
> >
> >     What do you all think? Am I designing these URIs correctly?
> >
> >     Should I bother making them heirarcical? Or should I simply
> >     create my own interpreation of the scheme specific part?
> >
> >     request:document
> >     request:content
> >     request:field:e-mail-address[1]
> >
> >     Thanks.
> >
> > --
> > Alan Gutierrez - alan@e...
> >     - http://engrm.com/blogometer/index.html
> >     - http://engrm.com/blogometer/rss.2.0.xml
> >
> > -----------------------------------------------------------------
> > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> > initiative of OASIS <http://www.oasis-open.org>
> >
> > The list archives are at http://lists.xml.org/archives/xml-dev/
> >
> > To subscribe or unsubscribe from this list use the subscription
> > manager: <http://www.oasis-open.org/mlmanage/index.php>
> >
> >
> 
> --
> <M:D/>
> 
> :: M. David Peterson ::
> XML & XML Transformations, C#, .NET, and Functional Languages Specialist
> 


-- 
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

  • References:

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.