Attempting to restrict VXML schema
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Attempting to restrict VXML schema
Post by mjlee@mindless.com »
Hi,
I am currently evaluating oxygen to become our platform for editing/generating VXML files. At the moment, we only support a subset of VXML, so want to redefine portions of the published vxml.xsd schema.
All my attempts to redefine the vxml element have been rejected by oxygen. I'm probably doing it wrong, but maybe it's a problem with oxygen? Basically, I want to restrict the allowed "top level" elements to <form> and <menu>. Here's my attempt:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.w3.org/2001/vxml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:redefine schemaLocation="http://www.w3.org/TR/voicexml20/vxml.xsd">
<xsd:complexType name="vxml">
<xsd:complexContent>
<xsd:restriction base="vxml">
<xsd:element ref="form"/>
<xsd:element ref="menu"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:redefine>
</xsd:schema>
The errors oxygen gives are:
E src-redefine.5.b.d: 'restriction' does not have a 'base' attribute that refers to the redefined element, 'http://www.w3.org/2001/vxml,vxml'. <complexType> children of <redefine> elements must have <extension> or <restriction> descendants, with 'base' attributes that refer to themselves.
and
E src-resolve.4.1: Error resolving component 'vxml'. It was detected that 'vxml' has no namespace, but components with no target namespace are not referenceable from schema document 'http://192.168.168.200/vxml/symvxml.xsd'. If 'vxml' is intended to have a namespace, perhaps a prefix needs to be provided. If it is intended that 'vxml' has no namespace, then an 'import' without a "namespace" attribute should be added to 'http://192.168.168.200/vxml/symvxml.xsd'.
Am I doing something wrong?
Thanks,
Matt
I am currently evaluating oxygen to become our platform for editing/generating VXML files. At the moment, we only support a subset of VXML, so want to redefine portions of the published vxml.xsd schema.
All my attempts to redefine the vxml element have been rejected by oxygen. I'm probably doing it wrong, but maybe it's a problem with oxygen? Basically, I want to restrict the allowed "top level" elements to <form> and <menu>. Here's my attempt:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.w3.org/2001/vxml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:redefine schemaLocation="http://www.w3.org/TR/voicexml20/vxml.xsd">
<xsd:complexType name="vxml">
<xsd:complexContent>
<xsd:restriction base="vxml">
<xsd:element ref="form"/>
<xsd:element ref="menu"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:redefine>
</xsd:schema>
The errors oxygen gives are:
E src-redefine.5.b.d: 'restriction' does not have a 'base' attribute that refers to the redefined element, 'http://www.w3.org/2001/vxml,vxml'. <complexType> children of <redefine> elements must have <extension> or <restriction> descendants, with 'base' attributes that refer to themselves.
and
E src-resolve.4.1: Error resolving component 'vxml'. It was detected that 'vxml' has no namespace, but components with no target namespace are not referenceable from schema document 'http://192.168.168.200/vxml/symvxml.xsd'. If 'vxml' is intended to have a namespace, perhaps a prefix needs to be provided. If it is intended that 'vxml' has no namespace, then an 'import' without a "namespace" attribute should be added to 'http://192.168.168.200/vxml/symvxml.xsd'.
Am I doing something wrong?
Thanks,
Matt
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Matt,
Both errros refer to the fact that the vxml value specified as the value of the xsd:restriction/@base attribute is from no namespace, while there it is expected to be from the http://www.w3.org/2001/vxml namespace, and more, as the type redefined is called vxml it should be in fact a reference to the vxml complex type definition from the http://www.w3.org/TR/voicexml20/vxml.xsd schema.
So correcting this by setting the default namespace to point to the http://www.w3.org/2001/vxml namespace:
will remove the errors you reported BUT will also give you an error. The reson for the last error is that there is no vxml complex type declaration in the http://www.w3.org/TR/voicexml20/vxml.xsd schema. The vxml element is specified using an anonymous type therefore you cannot redefine the vxml element type:
Hope that clarifies things for you.
Best Regards,
George
Both errros refer to the fact that the vxml value specified as the value of the xsd:restriction/@base attribute is from no namespace, while there it is expected to be from the http://www.w3.org/2001/vxml namespace, and more, as the type redefined is called vxml it should be in fact a reference to the vxml complex type definition from the http://www.w3.org/TR/voicexml20/vxml.xsd schema.
So correcting this by setting the default namespace to point to the http://www.w3.org/2001/vxml namespace:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.w3.org/2001/vxml" xmlns="http://www.w3.org/2001/vxml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:redefine schemaLocation="http://www.w3.org/TR/voicexml20/vxml.xsd">
<xsd:complexType name="vxml">
<xsd:complexContent>
<xsd:restriction base="vxml">
<xsd:element ref="form"/>
<xsd:element ref="menu"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:redefine>
</xsd:schema>
Code: Select all
<xsd:element name="vxml">
<xsd:complexType> <!-- this is the anonymous type for the vxml element -->
...
</xsd:complexType>
</xsd:element>
Best Regards,
George
-
- Posts: 3
- Joined: Sun May 30, 2004 7:43 am
Post by leematthew »
George,
Thanks a lot for your assistance!
If I understand your reply correctly, W3C have made it impossible to redefine portions of the VXML Schema?
Thanks again,
Matt
Thanks a lot for your assistance!
If I understand your reply correctly, W3C have made it impossible to redefine portions of the VXML Schema?
Thanks again,
Matt
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Matt,
No, only that you cannot redefine vxml as it is an element and not a complex type. You can refefine the complex and simple types, the groups and the attribute groups. So look for these constrcuts in the VXML schema and you will find what can be redefined.
For instance the following schema redefines the executable.content group allowing only two elements, log and return:
The executable.content group is used for instance in the definition of the block element:
Thus the block element will contain only log an return.
If you look at the vxml element
you can see that the only thing that can be redefined in order to change the content of vxml is the event.handler group:
If you decide to redefine the event.handler group you should check also all the places where this group is referenced to see if your changes make sense also there.
Best Regards,
George
No, only that you cannot redefine vxml as it is an element and not a complex type. You can refefine the complex and simple types, the groups and the attribute groups. So look for these constrcuts in the VXML schema and you will find what can be redefined.
For instance the following schema redefines the executable.content group allowing only two elements, log and return:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.w3.org/2001/vxml"
xmlns="http://www.w3.org/2001/vxml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:vxml="http://www.w3.org/2001/vxml">
<xsd:redefine schemaLocation="http://www.w3.org/TR/voicexml20/vxml.xsd">
<xsd:group name="executable.content">
<xsd:choice>
<xsd:element ref="log"/>
<xsd:element ref="return"/>
</xsd:choice>
</xsd:group>
</xsd:redefine>
</xsd:schema>
Code: Select all
<xsd:element name="block">
<xsd:complexType mixed="true">
<xsd:group ref="executable.content" minOccurs="0" maxOccurs="unbounded"/>
<xsd:attributeGroup ref="Form-item.attribs"/>
</xsd:complexType>
</xsd:element>
If you look at the vxml element
Code: Select all
<xsd:element name="vxml">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:group ref="event.handler"/>
<xsd:element ref="form"/>
<xsd:element ref="link"/>
<xsd:element ref="menu"/>
<xsd:element ref="meta"/>
<xsd:element ref="metadata"/>
<xsd:element ref="property"/>
<xsd:element ref="script"/>
<xsd:element ref="var"/>
</xsd:choice>
<xsd:attribute name="application" type="URI.datatype"/>
<xsd:attribute ref="xml:base"/>
<xsd:attribute ref="xml:lang"/>
<xsd:attribute name="version" type="xsd:string" use="required"/>
</xsd:complexType>
Code: Select all
<xsd:group name="event.handler">
<xsd:choice>
<xsd:element ref="catch"/>
<xsd:element ref="help"/>
<xsd:element ref="noinput"/>
<xsd:element ref="nomatch"/>
<xsd:element ref="error"/>
</xsd:choice>
</xsd:group>
Best Regards,
George
-
- Posts: 3
- Joined: Sun May 30, 2004 7:43 am
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service