[xquery-talk] Serialize xml to html5 with php.
ms at basex.org
Thu Nov 27 08:00:06 PST 2014
I started toying around, here are three more or less pragmatic
Are you required to use html(5) serialization? From what I understand
processing instructions in HTML are serialized differently, '?>'
serializes to '>':
(there may be a better source for this behavior, but this is what I
In case you are not, you could work around this using xhtml
> declare option output:method "xhtml";
> <?php print "Hi" ?>
or alternatively add an extra '?':
> declare option output:method "html";
> declare option output:html-version "5.0";
> <?php haha ??>
or you could make use of PHPs script syntax:
> <script language="php">
> echo 'some editors (like FrontPage) don\'t
> like processing instructions';
On 27 Nov 2014, at 16:33, France Baril wrote:
> I was trying to use BaseX to export files that contain some php code,
> after xml to html5 serialization <?php ... ?> becomes <?php ...>.
> They suggested I contact this list to enquire about any option to
> the php with the closing '?'?
> France Baril
> Architecte documentaire / Documentation architect
> france.baril at architextus.com
> talk at x-query.com
More information about the talk