Re: [pmwiki-users] PmWiki as XML source ?
> So, I again say that this would probably be better done by > creating something like ?action=xml > some sort. (And in fact this is exactly what ?action=rss, > ?action=rdf, ?action=atom do -- they produce xml-based views > of pagelists.) You are right. The layout of the output when using these options is perfect. What we need then is something that does the same as action=browse (processing pagelists, conditonals, includes, etc.), but outputs the result "as is". I just had a look at feeds.php to see if I could try to do it myself, but it does not appear to be a trivial task. If you could give me a hint about the variables and fucntions that are (not) needed to produce this result, I am prepared to spend some time on this. ...unless of course you have a solution at hand. Thanks a lot for your help. Christophe ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
On Fri, Jul 20, 2007 at 07:01:32PM +0200, Christophe David wrote: > >Sure -- that's what the example I gave demonstrates -- see > > http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml > >None of the css or formatting or HTML head/body/title/etc. elements > > Not really : > > See http://www.pmwiki.org/wiki/Test/XMLTest2?skin=xml > > then, view source. > ... > > > > that are not acceptable in XML... (Note that are valid XML.) I'm not sure that page is doing at all what you think it's doing. In particular, the tags , , etc. are not at all XML tags. In the output source they're actually coming across as "" and "" -- i.e., with the angle brackets escaped. So, in order for this to produce actual XML output you'd have to do the equivalent of EnableHTML on the page, so that HTML sequences can be embedded directly. But really I think this means that ?action=browse is not the thing we want here, because ?action=browse and (:pagelist:) are explicitly designed to produce XHTML, not XML, and they're intended to escape any angle brackets and other character entities coming from markup. So, I again say that this would probably be better done by creating something like ?action=xml, or perhaps ?action=pagelist if the intent is to always produce an XML-based pagelist of some sort. (And in fact this is exactly what ?action=rss, ?action=rdf, ?action=atom do -- they produce xml-based views of pagelists.) Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
On Fri, Jul 20, 2007 at 11:35:34AM -0500, Patrick R. Michaud wrote: > On Fri, Jul 20, 2007 at 06:29:08PM +0200, Christophe David wrote: > > But up to now, I could not manage to get rid of css and formatting > > things that are not in my skin. > > > > It this possible ? > > Sure -- that's what the example I gave demonstrates -- see >http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml > ... In fact, you can see how I created the skin by looking at the files at http://www.pmwiki.org/pmwiki/pub/skins/xml/ Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
> Sure -- that's what the example I gave demonstrates -- see >http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml > None of the css or formatting or HTML head/body/title/etc. elements Not really : See http://www.pmwiki.org/wiki/Test/XMLTest2?skin=xml then, view source. There are still things like that are not acceptable in XML... So we are close to it, but there are still a few things we would need to get rid off when using skin=xml. ...hence my original question ;-) If this could be done, it would open fantastic oportunities. A simple example: Flash applications that need XML configuration files could get them from PmWiki instead of hard coded XML text files, making their maintenance or customizaton a breeze. Christophe ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
On Fri, Jul 20, 2007 at 06:29:08PM +0200, Christophe David wrote: > >Okay, you're asking for something very different from what PmWiki > >produces. PmWiki doesn't have markup rules for producing > > Well, I would already be very happy to create the pagelist templates > myself to generate > > > abc > cde > > > as long as I could use a skin that would set the http header and not > generate any other output than this (and possibly an tag. > > But up to now, I could not manage to get rid of css and formatting > things that are not in my skin. > > It this possible ? Sure -- that's what the example I gave demonstrates -- see http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml None of the css or formatting or HTML head/body/title/etc. elements are in the output, only the output of the pagelist command. (View the document source to see what it has -- don't try to look at it with an XML parser, since it obviously won't parse as XML yet.) Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
> Okay, you're asking for something very different from what PmWiki > produces. PmWiki doesn't have markup rules for producing Well, I would already be very happy to create the pagelist templates myself to generate abc cde as long as I could use a skin that would set the http header and not generate any other output than this (and possibly an tag. But up to now, I could not manage to get rid of css and formatting things that are not in my skin. It this possible ? Christophe ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
On Fri, Jul 20, 2007 at 06:07:07PM +0200, Christophe David wrote: > >Wouldn't we also need at least a tag at > >the beginning? > > The specs are : > "The root element can be preceded by an optional XML declaration. This > element states what version of XML is in use (normally 1.0); it may > also contain information about character encoding and external > dependencies. > > " > > So yes, this may be added. > > > >As a start, see > > http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml > > I cannot check easly the http header right now, but it needs to be text/XML I think the canonical form is "text/xml", and yes, the skin is already setting the http header. > To please the XML parser, the data may not contain '<' or '>', unless > enclosed between > > > > So we want in this example > > " > > > > > > > > Okay, you're asking for something very different from what PmWiki produces. PmWiki doesn't have markup rules for producing elements, or things like , or placing things inside of CDATA contexts. We could possibly create such markups, but that's quite a bit more complex than a simple skin would typically provide. It seems that what you're really looking for is something more along the lines of an RSS feed, which _does_ generate XML output directly from pagelists. And feeds.php is fully configurable, meaning it's possible to define custom tags and components in the XML output. See http://www.pmwiki.org/wiki/PmWiki/WebFeeds . Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
> Wouldn't we also need at least a tag at > the beginning? The specs are : "The root element can be preceded by an optional XML declaration. This element states what version of XML is in use (normally 1.0); it may also contain information about character encoding and external dependencies. " So yes, this may be added. > As a start, see > http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml I cannot check easly the http header right now, but it needs to be text/XML To please the XML parser, the data may not contain '<' or '>', unless enclosed between So we want in this example " Christophe --- ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
On Fri, Jul 20, 2007 at 04:22:51PM +0200, Christophe David wrote: > >Sure... just create a skin for it, and omit the > >and directives. > >I'll be glad to create one for this, if someone can let me > >know what belongs and doesn't belong in the resulting output. > > Well, basically, a page containg > > > 123 > > > shown with the "XML" skin should return > > an HTTP header "Content-Type: text/XML" > > then nothing else than the text above. Wouldn't we also need at least a tag at the beginning? As a start, see http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
> Sure... just create a skin for it, and omit the > and directives. > I'll be glad to create one for this, if someone can let me > know what belongs and doesn't belong in the resulting output. Well, basically, a page containg 123 shown with the "XML" skin should return an HTTP header "Content-Type: text/XML" then nothing else than the text above. this would open in a browser as XML with the default XSL of the browser. On my current installation, I get other formatting code, possibly coming from recipes, even with a stripped down skin. Christophe ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] PmWiki as XML source ?
On Fri, Jul 20, 2007 at 03:06:03PM +0200, Christophe David wrote: > Many applications use XML formatted data obtained from a web server. > > PmWiki pagelists formats are so powerful that the information returned > could be used by other applications expecting XML, if the there was a > way let PmWiki return "Content-Type: text/XML" in the HTTP header, > and to remove the stylesheet stuff that is returned "around" what is > defined in the skin template. > > Is there a way to do that ? Sure... just create a skin for it, and omit the and directives. I'll be glad to create one for this, if someone can let me know what belongs and doesn't belong in the resulting output. Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users