Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Wildcard vs. Import

Reply
Thread Tools

Wildcard vs. Import

 
 
Grant Robertson
Guest
Posts: n/a
 
      06-06-2007
I am having a little trouble sorting out the exact differences between
using wildcards and using import in XML schema.

I know that a wildcard allows any global elements from the referenced
schema/namespace to be used in an XML instance document based on the
current schema but only within the element where the wildcard is
specified. When I import a schema, does that allow ANY elements from the
imported schema to be used ANYWHERE in the XML instance document? Or does
that just allow you to then borrow only specific components from the
imported schema for use within your current schema and only those
components are allowed to appear in the XML instance document?

If the latter, is the only difference - between wildcards and import -
that wildcards allow any element from the referenced schema while import
only allows the specified elements? Are there any subtle differences that
I should know about?

 
Reply With Quote
 
 
 
 
Joe Kesselman
Guest
Posts: n/a
 
      06-06-2007
Grant Robertson wrote:
> When I import a schema, does that allow ANY elements from the
> imported schema to be used ANYWHERE in the XML instance document?


No.

The importing schema still defines the structure of its own elements.
The imported elements may only be used in places where the importing
schema explicitly references them, or uses a wildcard/ANY to allow them.

Suggested reading:
http://www.w3.org/TR/xmlschema-1/#co...n-schemaImport




--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
 
Reply With Quote
 
 
 
 
Grant Robertson
Guest
Posts: n/a
 
      06-07-2007
In article <(E-Mail Removed)>, keshlam-
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> The importing schema still defines the structure of its own elements.
> The imported elements may only be used in places where the importing
> schema explicitly references them, or uses a wildcard/ANY to allow them.
>

Thanks, again, for your help.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcard String Comparisons: Set Pattern to a Wildcard Source chaoticcranium@gmail.com Python 7 10-05-2010 09:26 PM
to use import java.lang.* or import java.lang.Math or none at all? JPractitioner Java 13 02-24-2006 08:48 PM
XML Schema question - does "import" import elements? Vitali Gontsharuk XML 2 08-25-2005 07:33 PM
difference between "import" with and without wildcard. Peter Rilling Java 1 03-25-2005 07:37 AM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM



Advertisments