Visual editing of XHTML fragments in mixed namespace documen
Posted: Mon Apr 11, 2011 12:52 pm
Hi,
I want to be able to edit xml files that contain xhtml fragments - where the xhtml fragments can be edited using the visual editing mode (Author mode in Oxygen).
To illustrate with an example: say I have a file containing info on a list of employees. This is an xml file that conforms to some schema, but contains fragments from the xhtml namespace - say employee profiles. This file would be eventually processed by software, but to make editing easier, it's desired that the user have visual editing (WYSIWYG) features when editing the xhtml segments.
The best behavior would be that the software can be set to automatically switch to the xhtml authoring mode when the cursor is within the xhtml tags - ie the xhtml tool bar will be displayed and visual editing will be available. Or less optimally the user should be able to switch to the xhtml authoring mode when the cursor is within the xhtml fragment.
This is an example:
So the first question is whether this is possible in Oxygen.
The second question is: if the software is designed to use the xhtml visual mode only on xhtml documents (with html root element), it is still acceptable to have a document with an xhtml root, conforming to xhtml schema, but containing fragments from other xml namespaces with their own schemas. Something like this:
This is not much different than the first example. Again the desired behavior is to be able to visually edit the xhtml segments.
The issue is, when I try to open any xhtml document with a schema declaration as in the above , Author mode doesn't show the xhtml authoring toolbar, it seems to only do so for xhtml documents with a DTD declaration not a schema declaration! So the question is how to make this second scenario work - I'm just thinking it might be more plausible.
Of course my questions could apply to any type of document with a visual authoring mode such as DocBook or others being mixed with other namespaces.
Regards -
Basel Shishani.
I want to be able to edit xml files that contain xhtml fragments - where the xhtml fragments can be edited using the visual editing mode (Author mode in Oxygen).
To illustrate with an example: say I have a file containing info on a list of employees. This is an xml file that conforms to some schema, but contains fragments from the xhtml namespace - say employee profiles. This file would be eventually processed by software, but to make editing easier, it's desired that the user have visual editing (WYSIWYG) features when editing the xhtml segments.
The best behavior would be that the software can be set to automatically switch to the xhtml authoring mode when the cursor is within the xhtml tags - ie the xhtml tool bar will be displayed and visual editing will be available. Or less optimally the user should be able to switch to the xhtml authoring mode when the cursor is within the xhtml fragment.
This is an example:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<employee-list
xmlns="http://example.org/emp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://example.org/emp file:emp-list.xsd" >
<employee>
<name> J Blog</name>
<position> Project Manager</position>
<div id="emp-desc" xmlns="http://www.w3.org/1999/xhtml"
xsi:schemaLocation="http://www.w3.org/1999/xhtml ../frameworks/xhtml11/schema/xhtml11.xsd">
<h2> History </h2>
<p> J Blog joined the company ...</p>
</div>
</employee>
</employee-list>
The second question is: if the software is designed to use the xhtml visual mode only on xhtml documents (with html root element), it is still acceptable to have a document with an xhtml root, conforming to xhtml schema, but containing fragments from other xml namespaces with their own schemas. Something like this:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml ../frameworks/xhtml11/schema/xhtml11.xsd"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:emp="http://example.org/emp"
xsi:schemaLocation="http://example.org/emp file:emp-list.xsd">
<head> <title></title> </head>
<body>
<emp:employee-list>
<emp:employee>
<emp:name> J Blog</emp:name>
<emp:position> Project Manager</emp:position>
<div id="emp-desc">
<h2> History </h2>
<p> J Blog joined the company ...</p>
</div>
</emp:employee>
</emp:employee-list>
</body>
</html>
The issue is, when I try to open any xhtml document with a schema declaration as in the above , Author mode doesn't show the xhtml authoring toolbar, it seems to only do so for xhtml documents with a DTD declaration not a schema declaration! So the question is how to make this second scenario work - I'm just thinking it might be more plausible.
Of course my questions could apply to any type of document with a visual authoring mode such as DocBook or others being mixed with other namespaces.
Regards -
Basel Shishani.