Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Problems when referencing an included attribute group with anyAttribute
Problems when referencing an included attribute group with anyAttribute [message #58853] Fri, 25 March 2005 14:06 Go to next message
Steve Speicher is currently offline Steve SpeicherFriend
Messages: 87
Registered: July 2009
Member

This is a multi-part message in MIME format.
--------------020701000506070900010500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Greetings,

I'm having some difficulty with getting XSDWildcard information from
included schemas. I have included an example that illustrates the problem.

Specifically, I have a <attributeGroup> definition in an included schema
with contains <anyAttribute>. It appears that when I get the
XSDAttributeGroupDefinition.getAttributeWildcard() it always returns
null from the including schema.

To run the sample, install the plugin, it adds a context action for
*.xsd called "Parse XSD with Include and AttrGroup Wildcard". Running
on the file without the include will yield appropriate result. Running
on the schema that includes will show that it is null.

I haven't played with this much but I did have different results when I
had various namespaces (no default or no target) in the included schema.

Thanks in advance for any help,
Steve Speicher



--------------020701000506070900010500
Content-Type: text/xml;
name="Contact_any_attrgrp.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Contact_any_attrgrp.xsd"

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xsd:attributeGroup name="anyAttributeGroup">
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:attributeGroup>

</xsd:schema>
--------------020701000506070900010500
Content-Type: text/xml;
name="Contact_any_attrgroup_includer.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Contact_any_attrgroup_includer.xsd"

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:contact="http://www.ibm.com/contact"
targetNamespace="http://www.ibm.com/contact"
elementFormDefault="qualified">

<xsd:include schemaLocation="Contact_any_attrgrp.xsd"/>

<xsd:complexType name="includeAttrs">
<xsd:sequence>
<xsd:element name="dummy" type="xsd:string"/>
</xsd:sequence>
<xsd:attributeGroup ref="contact:anyAttributeGroup"/>
</xsd:complexType>

</xsd:schema>
--------------020701000506070900010500
Content-Type: application/zip;
name="xsd.include-attrgrp-wildcard.sample.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="xsd.include-attrgrp-wildcard.sample.zip"

UEsDBBQACAAIALRIeTIAAAAAAAAAAAAAAAArAAAAY29tLmlibS5ldGVjaC54 c2Quc2FtcGxl
LmluY2x1ZGUvLmNsYXNzcGF0aJ2PPQvCMBRFZwX/Q8huqptDaxGpoEOVUmep yaONxpeYD9F/
b1WKLjq43Xs5HLhxej0pcgHrpMaEjtmIEkCuhcQ6odtyMZzQdDrox1xVzpnK N23pvRugtzdy
lCgS6iyn5DG+YvSd5Bo7UtuaAVfSOGBGAOPaArNwDtKC2KhQS3R/qA7CM1UF 5E17hK2KbDdf
5+VsmWfFL5sO3gTfCfcSn3Acfb6/A1BLBwjKfBFNpQAAADMBAABQSwMEFAAI AAgAtEh5MgAA
AAAAAAAAAAAAACkAAABjb20uaWJtLmV0ZWNoLnhzZC5zYW1wbGUuaW5jbHVk ZS8ucHJvamVj
dL2SzU4DIRSF15r4Ds3sZXTngk6TatxpTKoPQC/XKQ1cCD9NH19ARjOZmLgw 7u45nMNHAL45
G706oQ/K0rq7ZTfdCgmsVDSuu7fXx+u7bjNcXXLn7REhPmAAr1zM6execBIG B7CGqb1hGBEO
7BwkC8I4jUwR6CSR9zVW8jlqkOLA+2kqbts8VNHP1D4pLXcOoagm73NVkKxO O4L1I0PQygVk
RxkZWJ8HcRK1gP77CLkh/JgKOzTdzw3eLyi/4jqJ7EmQescQt/+L3cEBjfgT aHOmK8+8mDy2
9KdY4F90GhU918VCr6GfCrPnoUVnmgvx6y/Mv90HUEsHCHrlrA71AAAAtQIA AFBLAwQUAAgA
CAC0SHkyAAAAAAAAAAAAAAAAMQAAAGNvbS5pYm0uZXRlY2gueHNkLnNhbXBs ZS5pbmNsdWRl
L2J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hzZC5zYW1wbGUuaW5jbHVkZS9zcmMvY29tL2libS9ldGVj aC94c2Qvc2Ft
cGxlL2luY2x1ZGUvSW5jbHVkZVBsdWdpbi5qYXZhUEsBAhQAFAAIAAgAtEh5 MqpYSJGzBAAA
eQ8AAGwAAAAAAAAAAAAAAAAA3QcAAGNvbS5pYm0uZXRlY2gueHNkLnNhbXBs ZS5pbmNsdWRl
L3NyYy9jb20vaWJtL2V0ZWNoL3hzZC9zYW1wbGUvaW5jbHVkZS9wb3B1cC9h Y3Rpb25zL1Bh
cnNlWFNEd2l0aEluY2x1ZGUuamF2YVBLBQYAAAAABgAGAIgCAAAqDQAAAAA=
--------------020701000506070900010500--
Re: Problems when referencing an included attribute group with anyAttribute [message #58879 is a reply to message #58853] Fri, 25 March 2005 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------070608090101010408070905
Content-Type: multipart/alternative;
boundary="------------060501020902050000090908"


--------------060501020902050000090908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Steve,

The attribute wildcard content feature is not being cloned. I've
attached a patch to fix that. Please open a bugzilla.


Steve Speicher wrote:

> Greetings,
>
> I'm having some difficulty with getting XSDWildcard information from
> included schemas. I have included an example that illustrates the
> problem.
>
> Specifically, I have a <attributeGroup> definition in an included
> schema with contains <anyAttribute>. It appears that when I get the
> XSDAttributeGroupDefinition.getAttributeWildcard() it always returns
> null from the including schema.
>
> To run the sample, install the plugin, it adds a context action for
> *.xsd called "Parse XSD with Include and AttrGroup Wildcard". Running
> on the file without the include will yield appropriate result.
> Running on the schema that includes will show that it is null.
>
> I haven't played with this much but I did have different results when
> I had various namespaces (no default or no target) in the included
> schema.
>
> Thanks in advance for any help,
> Steve Speicher
>
>
> ------------------------------------------------------------ ------------
>
><?xml version="1.0"?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
>
> <xsd:attributeGroup name="anyAttributeGroup">
> <xsd:anyAttribute namespace="##other" processContents="lax"/>
> </xsd:attributeGroup>
>
></xsd:schema>
>
> ------------------------------------------------------------ ------------
>
><?xml version="1.0"?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:contact="http://www.ibm.com/contact"
> targetNamespace="http://www.ibm.com/contact"
> elementFormDefault="qualified">
>
> <xsd:include schemaLocation="Contact_any_attrgrp.xsd"/>
>
> <xsd:complexType name="includeAttrs">
> <xsd:sequence>
> <xsd:element name="dummy" type="xsd:string"/>
> </xsd:sequence>
> <xsd:attributeGroup ref="contact:anyAttributeGroup"/>
> </xsd:complexType>
>
></xsd:schema>
>


--------------060501020902050000090908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Steve,<br>
<br>
The attribute wildcard content feature is not being cloned.&nbsp; I've
attached a patch to fix that.&nbsp; Please open a bugzilla.<br>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd21ao2$jjv$1@news.eclipse.org" type="cite">Greetings,
<br>
<br>
I'm having some difficulty with getting XSDWildcard information from
included schemas.&nbsp; I have included an example that illustrates the
problem.
<br>
<br>
Specifically, I have a &lt;attributeGroup&gt; definition in an included
schema with contains &lt;anyAttribute&gt;.&nbsp; It appears that when I get
the XSDAttributeGroupDefinition.getAttributeWildcard() it always
returns null from the including schema.
<br>
<br>
To run the sample, install the plugin, it adds a context action for
*.xsd called "Parse XSD with Include and AttrGroup Wildcard".&nbsp; Running
on the file without the include will yield appropriate result.&nbsp; Running
on the schema that includes will show that it is null.
<br>
<br>
I haven't played with this much but I did have different results when I
had various namespaces (no default or no target) in the included
schema.
<br>
<br>
Thanks in advance for any help,
<br>
Steve Speicher
<br>
<br>
<br>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:attributeGroup name="anyAttributeGroup"&gt;
&lt;xsd:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xsd:attributeGroup&gt;

&lt;/xsd:schema&gt;</pre>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xmlns:contact=<a class="moz-txt-link-rfc2396E" href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:include schemaLocation="Contact_any_attrgrp.xsd"/&gt;

&lt;xsd:complexType name="includeAttrs"&gt;
&lt;xsd:sequence&gt;
&lt;xsd:element name="dummy" type="xsd:string"/&gt;
&lt;/xsd:sequence&gt;
&lt;xsd:attributeGroup ref="contact:anyAttributeGroup"/&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;</pre>
</blockquote>
<br>
</body>
</html>

--------------060501020902050000090908--

--------------070608090101010408070905
Content-Type: text/plain;
name="AttributeGroupDefinitionImpl.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="AttributeGroupDefinitionImpl.patch"

Index: XSDAttributeGroupDefinitionImpl.java
============================================================ =======
RCS file: /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDAttributeGroupDefinitionImpl.java,v
retrieving revision 1.4
diff -u -r1.4 XSDAttributeGroupDefinitionImpl.java
--- XSDAttributeGroupDefinitionImpl.java 7 Oct 2004 12:15:37 -0000 1.4
+++ XSDAttributeGroupDefinitionImpl.java 25 Mar 2005 15:17:08 -0000
@@ -1187,6 +1187,12 @@
{
clonedAttributeGroupDefinition.getContents().addAll(cloneCon creteComponents(getContents(), true, shareDOM));
}
+
+ if (getAttributeWildcardContent() != null)
+ {
+ clonedAttributeGroupDefinition.setAttributeWildcardContent
+ ((XSDWildcard)getAttributeWildcardContent().cloneConcreteCom ponent(true, shareDOM));
+ }
}

if (shareDOM && getElement() != null)

--------------070608090101010408070905--
Re: Problems when referencing an included attribute group with anyAttribute [message #58903 is a reply to message #58879] Fri, 25 March 2005 17:59 Go to previous message
Steve Speicher is currently offline Steve SpeicherFriend
Messages: 87
Registered: July 2009
Member

This is a multi-part message in MIME format.
--------------020003000203000503070708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ed,

Bug# 89114 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=89114>
Thanks for the patch. I attempted but wrongly cloned the
getAttributeWildcardContent().

Tested fix again and works fine. Let me know if you need more info.

- Steve

Ed Merks wrote:

> Steve,
>
> The attribute wildcard content feature is not being cloned. I've
> attached a patch to fix that. Please open a bugzilla.
>
>
> Steve Speicher wrote:
>
>> Greetings,
>>
>> I'm having some difficulty with getting XSDWildcard information from
>> included schemas. I have included an example that illustrates the
>> problem.
>>
>> Specifically, I have a <attributeGroup> definition in an included
>> schema with contains <anyAttribute>. It appears that when I get the
>> XSDAttributeGroupDefinition.getAttributeWildcard() it always returns
>> null from the including schema.
>>
>> To run the sample, install the plugin, it adds a context action for
>> *.xsd called "Parse XSD with Include and AttrGroup Wildcard".
>> Running on the file without the include will yield appropriate
>> result. Running on the schema that includes will show that it is null.
>>
>> I haven't played with this much but I did have different results when
>> I had various namespaces (no default or no target) in the included
>> schema.
>>
>> Thanks in advance for any help,
>> Steve Speicher
>>
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version="1.0"?>
>><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified">
>>
>> <xsd:attributeGroup name="anyAttributeGroup">
>> <xsd:anyAttribute namespace="##other" processContents="lax"/>
>> </xsd:attributeGroup>
>>
>></xsd:schema>
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version="1.0"?>
>><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:contact="http://www.ibm.com/contact"
>> targetNamespace="http://www.ibm.com/contact"
>> elementFormDefault="qualified">
>>
>> <xsd:include schemaLocation="Contact_any_attrgrp.xsd"/>
>>
>> <xsd:complexType name="includeAttrs">
>> <xsd:sequence>
>> <xsd:element name="dummy" type="xsd:string"/>
>> </xsd:sequence>
>> <xsd:attributeGroup ref="contact:anyAttributeGroup"/>
>> </xsd:complexType>
>>
>></xsd:schema>
>>
>
> ------------------------------------------------------------ ------------
>
>Index: XSDAttributeGroupDefinitionImpl.java
> ============================================================ =======
>RCS file: /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDAttributeGroupDefinitionImpl.java,v
>retrieving revision 1.4
>diff -u -r1.4 XSDAttributeGroupDefinitionImpl.java
>--- XSDAttributeGroupDefinitionImpl.java 7 Oct 2004 12:15:37 -0000 1.4
>+++ XSDAttributeGroupDefinitionImpl.java 25 Mar 2005 15:17:08 -0000
>@@ -1187,6 +1187,12 @@
> {
> clonedAttributeGroupDefinition.getContents().addAll(cloneCon creteComponents(getContents(), true, shareDOM));
> }
>+
>+ if (getAttributeWildcardContent() != null)
>+ {
>+ clonedAttributeGroupDefinition.setAttributeWildcardContent
>+ ((XSDWildcard)getAttributeWildcardContent().cloneConcreteCom ponent(true, shareDOM));
>+ }
> }
>
> if (shareDOM && getElement() != null)
>
>

--------------020003000203000503070708
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ed,<br>
<br>
Bug# <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=89114">89114</a><br>
Thanks for the patch.&nbsp; I attempted but wrongly cloned the
getAttributeWildcardContent().<br>
<br>
Tested fix again and works fine.&nbsp; Let me know if you need more info.<br>
<br>
- Steve<br>
<br>
Ed Merks wrote:
<blockquote cite="midd21f2e$p2j$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Steve,<br>
<br>
The attribute wildcard content feature is not being cloned.&nbsp; I've
attached a patch to fix that.&nbsp; Please open a bugzilla.<br>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd21ao2$jjv$1@news.eclipse.org" type="cite">Greetings,
<br>
<br>
I'm having some difficulty with getting XSDWildcard information from
included schemas.&nbsp; I have included an example that illustrates the
problem. <br>
<br>
Specifically, I have a &lt;attributeGroup&gt; definition in an included
schema with contains &lt;anyAttribute&gt;.&nbsp; It appears that when I get
the XSDAttributeGroupDefinition.getAttributeWildcard() it always
returns null from the including schema. <br>
<br>
To run the sample, install the plugin, it adds a context action for
*.xsd called "Parse XSD with Include and AttrGroup Wildcard".&nbsp; Running
on the file without the include will yield appropriate result.&nbsp; Running
on the schema that includes will show that it is null. <br>
<br>
I haven't played with this much but I did have different results when I
had various namespaces (no default or no target) in the included
schema. <br>
<br>
Thanks in advance for any help, <br>
Steve Speicher <br>
<br>
<br>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:attributeGroup name="anyAttributeGroup"&gt;
&lt;xsd:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xsd:attributeGroup&gt;

&lt;/xsd:schema&gt;</pre>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xmlns:contact=<a class="moz-txt-link-rfc2396E"
href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
targetNamespace=<a class="moz-txt-link-rfc2396E"
href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:include schemaLocation="Contact_any_attrgrp.xsd"/&gt;

&lt;xsd:complexType name="includeAttrs"&gt;
&lt;xsd:sequence&gt;
&lt;xsd:element name="dummy" type="xsd:string"/&gt;
&lt;/xsd:sequence&gt;
&lt;xsd:attributeGroup ref="contact:anyAttributeGroup"/&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;</pre>
</blockquote>
<br>
<pre wrap="">
<hr size="4" width="90%">
Index: XSDAttributeGroupDefinitionImpl.java
============================================================ =======
RCS file: /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDAttributeGroupDefinitionImpl.java,v
retrieving revision 1.4
diff -u -r1.4 XSDAttributeGroupDefinitionImpl.java
--- XSDAttributeGroupDefinitionImpl.java 7 Oct 2004 12:15:37 -0000 1.4
+++ XSDAttributeGroupDefinitionImpl.java 25 Mar 2005 15:17:08 -0000
@@ -1187,6 +1187,12 @@
{
clonedAttributeGroupDefinition.getContents().addAll(cloneCon creteComponents(getContents(), true, shareDOM));
}
+
+ if (getAttributeWildcardContent() != null)
+ {
+ clonedAttributeGroupDefinition.setAttributeWildcardContent
+ ((XSDWildcard)getAttributeWildcardContent().cloneConcreteCom ponent(true, shareDOM));
+ }
}

if (shareDOM &amp;&amp; getElement() != null)
</pre>
</blockquote>
</body>
</html>

--------------020003000203000503070708--
Re: Problems when referencing an included attribute group with anyAttribute [message #594616 is a reply to message #58853] Fri, 25 March 2005 15:20 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070608090101010408070905
Content-Type: multipart/alternative;
boundary="------------060501020902050000090908"


--------------060501020902050000090908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Steve,

The attribute wildcard content feature is not being cloned. I've
attached a patch to fix that. Please open a bugzilla.


Steve Speicher wrote:

> Greetings,
>
> I'm having some difficulty with getting XSDWildcard information from
> included schemas. I have included an example that illustrates the
> problem.
>
> Specifically, I have a <attributeGroup> definition in an included
> schema with contains <anyAttribute>. It appears that when I get the
> XSDAttributeGroupDefinition.getAttributeWildcard() it always returns
> null from the including schema.
>
> To run the sample, install the plugin, it adds a context action for
> *.xsd called "Parse XSD with Include and AttrGroup Wildcard". Running
> on the file without the include will yield appropriate result.
> Running on the schema that includes will show that it is null.
>
> I haven't played with this much but I did have different results when
> I had various namespaces (no default or no target) in the included
> schema.
>
> Thanks in advance for any help,
> Steve Speicher
>
>
> ------------------------------------------------------------ ------------
>
><?xml version="1.0"?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
>
> <xsd:attributeGroup name="anyAttributeGroup">
> <xsd:anyAttribute namespace="##other" processContents="lax"/>
> </xsd:attributeGroup>
>
></xsd:schema>
>
> ------------------------------------------------------------ ------------
>
><?xml version="1.0"?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:contact="http://www.ibm.com/contact"
> targetNamespace="http://www.ibm.com/contact"
> elementFormDefault="qualified">
>
> <xsd:include schemaLocation="Contact_any_attrgrp.xsd"/>
>
> <xsd:complexType name="includeAttrs">
> <xsd:sequence>
> <xsd:element name="dummy" type="xsd:string"/>
> </xsd:sequence>
> <xsd:attributeGroup ref="contact:anyAttributeGroup"/>
> </xsd:complexType>
>
></xsd:schema>
>


--------------060501020902050000090908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Steve,<br>
<br>
The attribute wildcard content feature is not being cloned.&nbsp; I've
attached a patch to fix that.&nbsp; Please open a bugzilla.<br>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd21ao2$jjv$1@news.eclipse.org" type="cite">Greetings,
<br>
<br>
I'm having some difficulty with getting XSDWildcard information from
included schemas.&nbsp; I have included an example that illustrates the
problem.
<br>
<br>
Specifically, I have a &lt;attributeGroup&gt; definition in an included
schema with contains &lt;anyAttribute&gt;.&nbsp; It appears that when I get
the XSDAttributeGroupDefinition.getAttributeWildcard() it always
returns null from the including schema.
<br>
<br>
To run the sample, install the plugin, it adds a context action for
*.xsd called "Parse XSD with Include and AttrGroup Wildcard".&nbsp; Running
on the file without the include will yield appropriate result.&nbsp; Running
on the schema that includes will show that it is null.
<br>
<br>
I haven't played with this much but I did have different results when I
had various namespaces (no default or no target) in the included
schema.
<br>
<br>
Thanks in advance for any help,
<br>
Steve Speicher
<br>
<br>
<br>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:attributeGroup name="anyAttributeGroup"&gt;
&lt;xsd:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xsd:attributeGroup&gt;

&lt;/xsd:schema&gt;</pre>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xmlns:contact=<a class="moz-txt-link-rfc2396E" href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:include schemaLocation="Contact_any_attrgrp.xsd"/&gt;

&lt;xsd:complexType name="includeAttrs"&gt;
&lt;xsd:sequence&gt;
&lt;xsd:element name="dummy" type="xsd:string"/&gt;
&lt;/xsd:sequence&gt;
&lt;xsd:attributeGroup ref="contact:anyAttributeGroup"/&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;</pre>
</blockquote>
<br>
</body>
</html>

--------------060501020902050000090908--

--------------070608090101010408070905
Content-Type: text/plain;
name="AttributeGroupDefinitionImpl.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="AttributeGroupDefinitionImpl.patch"

Index: XSDAttributeGroupDefinitionImpl.java
============================================================ =======
RCS file: /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDAttributeGroupDefinitionImpl.java,v
retrieving revision 1.4
diff -u -r1.4 XSDAttributeGroupDefinitionImpl.java
--- XSDAttributeGroupDefinitionImpl.java 7 Oct 2004 12:15:37 -0000 1.4
+++ XSDAttributeGroupDefinitionImpl.java 25 Mar 2005 15:17:08 -0000
@@ -1187,6 +1187,12 @@
{
clonedAttributeGroupDefinition.getContents().addAll(cloneCon creteComponents(getContents(), true, shareDOM));
}
+
+ if (getAttributeWildcardContent() != null)
+ {
+ clonedAttributeGroupDefinition.setAttributeWildcardContent
+ ((XSDWildcard)getAttributeWildcardContent().cloneConcreteCom ponent(true, shareDOM));
+ }
}

if (shareDOM && getElement() != null)

--------------070608090101010408070905--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problems when referencing an included attribute group with anyAttribute [message #594627 is a reply to message #58879] Fri, 25 March 2005 17:59 Go to previous message
Steve Speicher is currently offline Steve SpeicherFriend
Messages: 87
Registered: July 2009
Member

This is a multi-part message in MIME format.
--------------020003000203000503070708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ed,

Bug# 89114 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=89114>
Thanks for the patch. I attempted but wrongly cloned the
getAttributeWildcardContent().

Tested fix again and works fine. Let me know if you need more info.

- Steve

Ed Merks wrote:

> Steve,
>
> The attribute wildcard content feature is not being cloned. I've
> attached a patch to fix that. Please open a bugzilla.
>
>
> Steve Speicher wrote:
>
>> Greetings,
>>
>> I'm having some difficulty with getting XSDWildcard information from
>> included schemas. I have included an example that illustrates the
>> problem.
>>
>> Specifically, I have a <attributeGroup> definition in an included
>> schema with contains <anyAttribute>. It appears that when I get the
>> XSDAttributeGroupDefinition.getAttributeWildcard() it always returns
>> null from the including schema.
>>
>> To run the sample, install the plugin, it adds a context action for
>> *.xsd called "Parse XSD with Include and AttrGroup Wildcard".
>> Running on the file without the include will yield appropriate
>> result. Running on the schema that includes will show that it is null.
>>
>> I haven't played with this much but I did have different results when
>> I had various namespaces (no default or no target) in the included
>> schema.
>>
>> Thanks in advance for any help,
>> Steve Speicher
>>
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version="1.0"?>
>><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified">
>>
>> <xsd:attributeGroup name="anyAttributeGroup">
>> <xsd:anyAttribute namespace="##other" processContents="lax"/>
>> </xsd:attributeGroup>
>>
>></xsd:schema>
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version="1.0"?>
>><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:contact="http://www.ibm.com/contact"
>> targetNamespace="http://www.ibm.com/contact"
>> elementFormDefault="qualified">
>>
>> <xsd:include schemaLocation="Contact_any_attrgrp.xsd"/>
>>
>> <xsd:complexType name="includeAttrs">
>> <xsd:sequence>
>> <xsd:element name="dummy" type="xsd:string"/>
>> </xsd:sequence>
>> <xsd:attributeGroup ref="contact:anyAttributeGroup"/>
>> </xsd:complexType>
>>
>></xsd:schema>
>>
>
> ------------------------------------------------------------ ------------
>
>Index: XSDAttributeGroupDefinitionImpl.java
> ============================================================ =======
>RCS file: /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDAttributeGroupDefinitionImpl.java,v
>retrieving revision 1.4
>diff -u -r1.4 XSDAttributeGroupDefinitionImpl.java
>--- XSDAttributeGroupDefinitionImpl.java 7 Oct 2004 12:15:37 -0000 1.4
>+++ XSDAttributeGroupDefinitionImpl.java 25 Mar 2005 15:17:08 -0000
>@@ -1187,6 +1187,12 @@
> {
> clonedAttributeGroupDefinition.getContents().addAll(cloneCon creteComponents(getContents(), true, shareDOM));
> }
>+
>+ if (getAttributeWildcardContent() != null)
>+ {
>+ clonedAttributeGroupDefinition.setAttributeWildcardContent
>+ ((XSDWildcard)getAttributeWildcardContent().cloneConcreteCom ponent(true, shareDOM));
>+ }
> }
>
> if (shareDOM && getElement() != null)
>
>

--------------020003000203000503070708
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ed,<br>
<br>
Bug# <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=89114">89114</a><br>
Thanks for the patch.&nbsp; I attempted but wrongly cloned the
getAttributeWildcardContent().<br>
<br>
Tested fix again and works fine.&nbsp; Let me know if you need more info.<br>
<br>
- Steve<br>
<br>
Ed Merks wrote:
<blockquote cite="midd21f2e$p2j$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Steve,<br>
<br>
The attribute wildcard content feature is not being cloned.&nbsp; I've
attached a patch to fix that.&nbsp; Please open a bugzilla.<br>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd21ao2$jjv$1@news.eclipse.org" type="cite">Greetings,
<br>
<br>
I'm having some difficulty with getting XSDWildcard information from
included schemas.&nbsp; I have included an example that illustrates the
problem. <br>
<br>
Specifically, I have a &lt;attributeGroup&gt; definition in an included
schema with contains &lt;anyAttribute&gt;.&nbsp; It appears that when I get
the XSDAttributeGroupDefinition.getAttributeWildcard() it always
returns null from the including schema. <br>
<br>
To run the sample, install the plugin, it adds a context action for
*.xsd called "Parse XSD with Include and AttrGroup Wildcard".&nbsp; Running
on the file without the include will yield appropriate result.&nbsp; Running
on the schema that includes will show that it is null. <br>
<br>
I haven't played with this much but I did have different results when I
had various namespaces (no default or no target) in the included
schema. <br>
<br>
Thanks in advance for any help, <br>
Steve Speicher <br>
<br>
<br>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:attributeGroup name="anyAttributeGroup"&gt;
&lt;xsd:anyAttribute namespace="##other" processContents="lax"/&gt;
&lt;/xsd:attributeGroup&gt;

&lt;/xsd:schema&gt;</pre>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xmlns:contact=<a class="moz-txt-link-rfc2396E"
href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
targetNamespace=<a class="moz-txt-link-rfc2396E"
href="http://www.ibm.com/contact">"http://www.ibm.com/contact"</a>
elementFormDefault="qualified"&gt;

&lt;xsd:include schemaLocation="Contact_any_attrgrp.xsd"/&gt;

&lt;xsd:complexType name="includeAttrs"&gt;
&lt;xsd:sequence&gt;
&lt;xsd:element name="dummy" type="xsd:string"/&gt;
&lt;/xsd:sequence&gt;
&lt;xsd:attributeGroup ref="contact:anyAttributeGroup"/&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;</pre>
</blockquote>
<br>
<pre wrap="">
<hr size="4" width="90%">
Index: XSDAttributeGroupDefinitionImpl.java
============================================================ =======
RCS file: /home/technology/org.eclipse.xsd/plugins/org.eclipse.xsd/src /org/eclipse/xsd/impl/XSDAttributeGroupDefinitionImpl.java,v
retrieving revision 1.4
diff -u -r1.4 XSDAttributeGroupDefinitionImpl.java
--- XSDAttributeGroupDefinitionImpl.java 7 Oct 2004 12:15:37 -0000 1.4
+++ XSDAttributeGroupDefinitionImpl.java 25 Mar 2005 15:17:08 -0000
@@ -1187,6 +1187,12 @@
{
clonedAttributeGroupDefinition.getContents().addAll(cloneCon creteComponents(getContents(), true, shareDOM));
}
+
+ if (getAttributeWildcardContent() != null)
+ {
+ clonedAttributeGroupDefinition.setAttributeWildcardContent
+ ((XSDWildcard)getAttributeWildcardContent().cloneConcreteCom ponent(true, shareDOM));
+ }
}

if (shareDOM &amp;&amp; getElement() != null)
</pre>
</blockquote>
</body>
</html>

--------------020003000203000503070708--
Previous Topic:Problems when referencing an included attribute group with anyAttribute
Next Topic:Import directives
Goto Forum:
  


Current Time: Thu Apr 25 20:32:36 GMT 2024

Powered by FUDForum. Page generated in 0.02860 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top