Robert L. wrote:

It appears that I could work on an XML page that was generated by
oXygen from my own schema, which imports other schemas and places XHTML5
formatting elements between the schema derived elements. Is this
correct?

Sure, if this is done cleverly. I mean: XHTML5 ``formatting elements'' should not be allowed in places where it does not make sense to.

We often do this approach for own own needs. For example, we have a simple XML schema which is used to describe our add-ons. This XML schema uses a subset of XHTML to document the add-on. See "XMLmind XML Editor Configuration Pack" - http://www.xmlmind.com/xmleditor/addons_doc.html#xxe_config_pack



I want to use CSS to format my XML pages. Do you have an example of doing this.

Please download Evaluation Edition from this page:

http://www.xmlmind.com/xmleditor/download.shtml

In <XXE_install_dir>/addon/config/xhtml/css, docbook/css, docbook5/css, dita/css, you'll find the large CSS stylesheets we use to styles XHTML, DocBook and DITA documents.

Associating a document type to a CSS stylesheet is implemented by the means of the <css> configuration element. This element is found in a XXE configuration (.xxe) file.

Reference:

* The <css> configuration element
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/css.html

* XMLmind XML Editor - Configuration and Deployment
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/index.html

* XMLmind XML Editor - Support of Cascading Style Sheets (W3C CSS)
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/index.html



--> Of course, if you don't want to write an XXE configuration file, it's always possible to add an <?xml-stylesheet?> standard processing instruction at the top of your document.

This has been done in the following demo document:

<XXE_install_dir>/demo/bugreport.xml

This file starts with:
---
<?xml version="1.0" encoding="ISO-8859-1"?>

<?xml-stylesheet type="text/css" href="bugreport/bugreport.css"?>

<?xml-stylesheet type="text/css" href="bugreport/xmldata.css" alternate="yes"?>

<bugReports xsi:schemaLocation="http://www.xmlmind.com/xmleditor/schema/bugreport bugreport/bugreport.xsd"
            xmlns="http://www.xmlmind.com/xmleditor/schema/bugreport";
            xmlns:ns="http://www.xmlmind.com/xmleditor/schema/bugreport";
            xmlns:html="http://www.w3.org/1999/xhtml";>
...
---

Reference:

* Associating Style Sheets with XML documents 1.0 (Second Edition)
W3C Recommendation 28 October 2010
http://www.w3.org/TR/xml-stylesheet/




I have modified your XHTML5 schema and my schema
by adding a defaultOpenContent element to each with
processContents="skip". Unfortunately, that did not work.

That's normal. <defaultOpenContent> is an W3C XML Schema *1.1* element. See http://www.w3.org/TR/xmlschema11-1/#declare-schema

XMLmind XML Editor only supports W3C XML Schema *1.0*. See http://www.xmlmind.com/xmleditor/features.html#wxs

We don't plan to support W3C XML Schema 1.1 in the future unless, of course, a major document type requires it.




My goal was to have the elements from each schema ignore the elements of the 
other
schema, but validate its own elements.

This should not be problem, but you'll have to use W3C XML Schema 1.0 elements <any> and <anyAttribute> for that. See http://www.w3.org/TR/xmlschema-1/#Wildcards



--> Note that because XMLmind XML Editor is not comfortable to use in non-validating mode, we have a <validate> configuration element which can be described as:

---
OK, the W3C XML schema says: do not validate the elements belonging to namespace "foo", but we nevertheless want XMLmind XML Editor to work in strict validating mode for the elements belonging to namespace "foo".
---

We call this feature "Poor man's NVDL".

Reference:

* The  <validate> configuration element
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/validate.html

* NVDL
http://www.nvdl.org/



--> If you prefer to continue working with W3C XML Schema 1.1, why not consider purchasing/continue to using oXygen? I mean, I don't get it:

1) The XHTML5 schema written by [email protected] you have is open source. Feel free to use it with any XML software you want and even, to redistribute it as is or modified.

If you prefer to use latest version of this XHTML5 schema (no longer open source; updated to conform to W3C Recommendation "HTML5 A vocabulary and associated APIs for HTML and XHTML (October 28, 2014)"), then no need to purchase XMLmind XML Editor just for that, we can give it away to you with our authorization/blessing to use it for your own needs in any XML software you want.

2) oXygen can style XML elements using CSS.

3) oXygen supports W3C XML Schema 1.1. (If their W3C XML Schema 1.1 implementation comes from Saxon 9 as I suspect it, their W3C XML Schema 1.1 support should be outstanding.)

4) oXygen even fully supports NVDL.


--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to