NVDL how to?

Post here issues about NVDL, not specifically linked to the oNVDL implementation.
falk
Posts: 9
Location: Munich, Germany

NVDL how to?

Mon Dec 18, 2006 9:51 pm

:?: I just learned that Oxygen editor content completion has support for NVDL. This should make it possible to edit an XHTML document with embedded XFORMS and content completion support for both. However, I do know nothing about NVDL and I do not care. I just want to edit XHTML + XFORMS. Can you provide a little HOWTO about how to get this working using your great product? This could make me buy :wink:
sorin_ristache
Posts: 4144

Tue Dec 19, 2006 3:23 pm

Hello,

Content completion in an XML document based on a NVDL schema works the same as for the other types of schema and is documented in the User Manual. For example to create a new document based on the sample NVDL schema for XHTML with embedded XForms included in the oNVDL kit go to menu File -> New, select XML Document, in the dialog select the NVDL tab, in the URL field enter the NVDL schema, press OK to create the new editor. The editor should insert automatically the root element. In the current version (8.0) it does not do that but we will fix this in a future version of oXygen. Type the root element

Code: Select all

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml">

</xhtml:html>


and now the content completion support is available. Just type < inside the html element and the content completion window displays elements from the XHTML namespace and the XForms one.


Regards,
Sorin
falk
Posts: 9
Location: Munich, Germany

Tue Dec 19, 2006 4:29 pm

sorin wrote:sample NVDL schema for XHTML with embedded XForms included in the oNVDL kit


Hi again,

this is good news. However, now I really will need time to go into all this NVDL stuff. Therefore, I postponed the matter, including the purchase of Oxygen. In my particular case, it wasn't XHTML+XFORMS exactly (I only used this pair because you at Oxygen treat this as the standard example).

Actually, I cannot understand why I need to care about NVDL at all -- why can't Oxygen just allow multiple schemas to be allowed in one document, e.g., from the list of associated namespace - schemas in the settings dialog, e.g., with an additional "always allowed as embedded namespace" flag. This could be easily implemented by ONE person at oxygen (e.g., by generating the corresponsding NVDL definition on the fly) rather than by ALL of us learning the NVDL spec (which is not realistic to happen).

It is a pitty that this great support is in Oxygen and almost nobody will ever use it or even notice it. I guess Altova would make big fuss about all this if they could implement such a cool feature at all.
falk
Posts: 9
Location: Munich, Germany

Tue Dec 19, 2006 4:36 pm

falk wrote:It is a pitty that this great support is in Oxygen and almost nobody will ever use it or even notice it.

I should be more specific in one point: In our company we provide an annotation namespace schema ONLY because any XML schema is considered acceptable by our product. We would recommend Oxygen as preferred XML editor if our customers could use it to edit their documents incl. support for our annotation namespace. Right now they can't because we cannot explain to them how to create the required NVDL documents first. Therefore, you are almost there, but not exactly so.

I am waiting for this feature to emerge in Oxygen since more than 2 years and I will continue to do so. Keep me posted if you actually do it.
sorin_ristache
Posts: 4144

Wed Dec 20, 2006 4:32 pm

Hello,

Thank you for your request. We will consider allowing the creation of a new XML document based on a list of schemas instead of only one schema. Each schema defines a namespace and can be an XML Schema or Relax NG one. When you edit the document oXygen could offer in the content completion window elements from any namespace defined by a schema in this list by taking into account the current context for that namespace, that is the context obtained by stripping elements of other namespaces. Of course if you have to specify strict rules for using a namespace inside another one you still need to define a NVDL schema with these rules.


Regards,
Sorin
falk
Posts: 9
Location: Munich, Germany

Wed Dec 20, 2006 6:04 pm

sorin wrote:...completion window elements from any namespace defined by a schema in this list by taking into account the current context for that namespace...


Great!

I will continue to look forward for this great feature. In this XML-loaden world, it really becomes normal to mix namespaces in one document with schemata defined "on a per namespace base" only.

Therefore, this will be a major step forward in XML editing. So, don't forget to beat the marketing drum (as we say in germany) once you have it :lol:
mecklen
Posts: 6

Thu Apr 26, 2007 2:12 pm

Hello!

The NVDL support is really great and opens a lot of new possibilities for me. I´m nesting three XML schema with the following NVDL definition (with which I have really no experience):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0">
    <namespace ns="http:///level1">
        <validate schema="DESlevel1.xsd">
            <mode>
                <namespace ns="http:///level2">
                    <validate schema="DESlevel2.xsd">
                        <mode>
                            <namespace ns="http:///level3">
                                <validate schema="DESlevel3.xsd"/>
                            </namespace>
                        </mode>
                    </validate>
                </namespace>
            </mode>
        </validate>
    </namespace>
</rules>


Now my problem is that the code completion from Oxygen allways give me the elements for the parent http:///level1 namespace although I´m in the context of the http:///level2 namespace. I think the problem is my NVDL definition. To make it clear: In my XML document I´m in the context of the http:///level2 namespace and the code completion should only show the elements from http:///level2 and perhaps http:///level3, but not from http:///level1 namespace. Could anybody help? Thank you very much!
mecklen
Posts: 6

Thu Apr 26, 2007 3:25 pm

Ok, I´ve solved this problem. It was a question of the XML Schema, not NVDL. If you import the different schemata into each other everything with code completion is fine. And because the import is necessary by itself for validating the correct nesting of the namespaces this solution isn´t a hack in any way. Oxygen is not just a great editor for working with XML but also for further learning the xml possibilities!

Return to “General NVDL Issues”

Who is online

Users browsing this forum: No registered users and 0 guests