Re: <item>...</item>

Kimbro Staken <[email protected]> Sun, 5 Oct 2003 19:39:09 -0700
Newsgroups gmane.comp.web.syncato.general
Message-ID <[email protected]>
On Sunday, October 5, 2003, at 02:17  PM, Rick Bradley wrote:

> How much impact does removing the assumption that every document has a
> root node of '<item/>' have on the system?  Some things I can think of
> right away:

It shouldn't have much. It's even less in the more current code. Mostly 
  the stylesheets are affected by that type of change.

>
>  - documents get an @id attribute inserted into the root element
>
>  - pubDate may not be valid in non-<item/> documents (trivial to fix,
>    just check the rootElement name before adding)
>
>  - searching via Xpath might be less intuitive (e.g.,
>    http://www.domain.com/WK/blog///item wouldn't return all documents)
>
>  - this might affect indexing by dbxml, but I have no idea whether this
>    is true or not

Indexing is something that will need ti be controlled by configuration 
at some point.
>
> I see that it's perfectly possible to POST non-<item/> documents to the
> site, thought they'll get a <pubDate/> element added to them and an @id
> in the root element.  It looks to me though as if any xmlns 
> declarations
> are being stripped.  Additionally, it looks like Xpath isn't happy with
> much to do with a namespace when searching.  Hm.

XPath has no problem with namespaces but you have to declare them in a 
context handed to the processor. I've intentionally ignored namespaces 
to this point and would actually like to continue to do so for a while 
longer. My plan is to eventually declare namespaces in the 
configuration and then make them available to the various XPath pieces 
all the time.

There are lots of things that should really be in namespaces, i.e. 
anything the system ads into the documents like @id and pubDate. 
However, I've been trying to keep things as simple as possible to make 
stuff easy to change. Namespaces introduce a level of headaches that 
drive me nuts. They'll be necessary, but I want to focus on the 
concepts of the system without that annoyance.


wck
> -- 
>  http://www.rickbradley.com    MUPRN: 142
>                        |  away for a
>    random email haiku  |  delivery that would have
>                        |  no return address.
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Syncato-general mailing list
> Syncato-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/syncato-general
>
>
Kimbro Staken
Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf