I am interested in building a CMS that uses XML for data storage and XSLT for transforming the XML into XHTML. Originally I was going to use MySQL but I would like to learn more about the effectiveness of XML for CMS type applications. The only deficiency in using XML for data storage is searching. I figured out a way to use XPATH/XSLT to do a search which involves taking XML input (search terms and documents to search) and uses XSLT and XPATH (document() function) to iterate through documents and look for search terms. The result of the transform is another XML document that contains the search results which can then be sorted or paged or whatever using XSLT to transform it to XHTML final output. This search method seems to work fine for a simplistic search on only a few documents. I could make it more efficient by only searching a keywords field in the target XML document which PHP has determined to be the words that occur most in the content, but it still has to go through all documents so it doesn't help much. I could index the documents using MySQL, but I am trying to do this without a RDBMS. So, I was thinking of creating an XML-based inverted index (index that contains terms and which documents contain these terms) where there is one file for each letter of the alphabet (a.xml, b.xml, c.xml, etc...). When a user submits and article, PHP indexes that article by searching the content and determining word frequency, etc. Then PHP makes entries into the appropriate files (a.xml, b.xml, c.xml etc.) probably by using DOMXML. Then, given search terms (in the form of XML), an XSLT file would look through the index and gather results. Boolean search operations (AND/OR) could be accommodated by using set operations on resulting node sets in XSLT. The output of the XSLT operation on the search terms and the index documents would be xml data containing search results which would then be transformed into XHTML. I know this seems like a lot, but I am really trying to exercise my skills in writing effcient XSLT/XPATH to help me understand more about when to use XML. Can anyone here think of a more intuitive/efficient way of indexing/searching multiple XML documents without using a database?