Altova gave me permission to share their answer on the "root" question. I'm
not happy with it but not sure I want to pursue this. If there are other
customers on this list who think this is worth pursuing then we can gang up
on them. If so contact me off list.
--Ray
----- Original Message -----
From: "Altova Support Team" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, December 01, 2004 8:16 AM
Subject: RE: prompting for root element[ALTOVA Case # 12311]
Hello Ray,
Thank you very much for contacting us.
The way it has been designed and implemented, is that XMLSpy searches
for a global element which is not used anywhere and proposes it as the
root. In most cases this is also the right guess. The only exception
from this rule is that if all global elements were referenced somewhere,
we XMLSpy then is showing a list of all of them.
If you should need any further help please don't hesitate to get back to
me.
Kind Regards,
.. Niki Horak
... IT Support Engineer
... Altova GmbH
===================================================================
Altova(r) accelerates development and integration projects with soft-
ware, services and solutions that enhance productivity and maximize
results. Uncover why Altova is the smart choice of over 1.5 million
applications developers worldwide! Look into www.altova.com today!
XMLSpy(r) 2005 - MapForce(tm) 2005 - StyleVision(r) 2005 - Authentic(r)
2005
NEW: Advanced standards compliance, XSLT 2.0, XPath 2.0, XQuery 1.0
SchemaAgent, Eclipse integration, Visual function builder, Word/RTF
output, database-enabled electronic forms, XML<->flat-file mapping
===================================================================
The information transmitted in this message and/or as an attachment
to it is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons
or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer. Altova GmbH and Altova, Inc. do not
accept legal responsibility for the contents of this message. Any
views or opinions presented are solely those of the author and do
not necessarily represent those of Altova GmbH and Altova, Inc.
unless otherwise specifically stated. Thank you!
-----Original Message-----
From: [log in to unmask] [mailto:[log in to unmask]]
Sent: Tuesday, November 30, 2004 10:35 PM
To: Altova Support Team
Subject: prompting for root element[ALTOVA Case # 12311]
Case Number:12311
===============================================================
Customer Information
===============================================================
Name: ray denenberg
First Name: ray
Last Name: denenberg
Company: library of congress
Key-Code: TPEAMHN-3JS4XDV-G3R6IBN-W53L39N-GW7HPYI
http://www.altova.com/internal/tools/keycodesummary.asp?k=TPEAMHN-3JS4XD
V-G3R6IBN-W53L39N-GW7HPYI
===============================================================
Equipment Information
===============================================================
Operating System: Windows XP
OS Service Pack:
OS Language:
CPU Speed:
Ram:
IE Version:
IE service Pack:
Office Version:
Office Language:
Office Service Pack:
===============================================================
Product Information
===============================================================
Product: XMLSpy Professional Edition
Component: Validation
Version: 2004r4
===============================================================
Support Request
===============================================================
Summary:
prompting for root element
Description:
When a schema defines multiple root elements, when you begin an
instance, you want to be promted for a root element (and offered the
full list of choices). This happens sometimes and sometimes not. See
below.
Steps to Reproduce:
(1) for the following schema:
-----------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.loc.gov/xxx"
xmlns="http://www.loc.gov/xxx"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="mads"/>
<xsd:element name="muds"/>
</xsd:schema>
------------------------------------------------------
If I try to create an instance I am prompted for a root element, "mads"
or "muds" (correct behavior).
(2) However for the following:
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.loc.gov/xxx"
xmlns="http://www.loc.gov/xxx"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="mads"/>
<xsd:element name="muds">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="mads" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
-----------------------------------------------------------------
I don't get prompted for a root element, it forces the root to be
<muds>. At first glance I would assume the problem is related to the
fact that muds references mads. (However I'm not buying the explanation
that you can't do that. It's a bug.)
(3) Please bear with me and consider a variation of (1):
________________________________________________________________________
_______
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.loc.gov/xxx"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.loc.gov/xxx"> <xsd:element name="mods" type="x"/>
<xsd:element name="muds">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="mods" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="x">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="y"/>
<xsd:element name="z"/>
<xsd:any/>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
________________________________________________________________________
______
This one behaves correctly, even though there is the same
interelationship among root elements which appeared to be the problem in
(1).
(4) And the following, in which the "any" is removed but is otherwise
identical to (3):
______________________________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.loc.gov/xxx"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.loc.gov/xxx">
<xsd:element name="mods" type="x"/>
<xsd:element name="muds">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="mods" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="x">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="y"/>
<xsd:element name="z"/>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
_______________________________________________________________________
And it doesn't work! (So it seems, the flaw that causes the problem is
apparently hidden by the presence of 'any'.)
What's going on!
Thanks!
--Ray Denenberg
Library of Congress
|