| Author | 
		  Message
		 | 
		
		  | venusboy | 
		  
		    
			  
				 Posted: Wed Nov 29, 2006 9:18 pm    Post subject: Creating an XML attribute for a xsd:AnyType using MRM | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 11 Jun 2002 Posts: 51
  
  | 
		  
		    
			  
				I have a XML schema that I need to model as an MRM for validation purposes. This schema contains a xsd:AnyType type, for example:
 
 
<xs:element name="FixedType" type="xs:string">
 
<xs:element name="AnyType" type="xs:anyType"/>
 
 
Thus the following XML is valid against the Schema extract:
 
 
<FixedType>myString</FixedType>
 
<AnyType undefinedAttribute="67890">
 
    <UndefinedElement>12345</UndefinedElement>
 
</AnyType>
 
 
The question is how can I model the attribute when it's defined as an anyType MRM? The MRM defines the xs:anyType as:
 
 
a) Wildcard Attribute *
 
b) Wildcard Element *
 
 
Which is fine for incoming messages, but I need to construct the example above.
 
 
Can this be done in one swoop. Reading other posts, then I understand the (XML.Attr) will compile and deploy but has no effect on the MRM as normally the XML type would be defined in the set.
 
 
Thanks in advance. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Thu Nov 30, 2006 1:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				| Have you tried importing your schema? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | venusboy | 
		  
		    
			  
				 Posted: Mon Dec 04, 2006 9:24 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 11 Jun 2002 Posts: 51
  
  | 
		  
		    
			  
				Thanks for the response and not getting back to you earlier.
 
 
Yes that's the point am using an MRM that is has been generated by importing my XSD. But I cannot tell the MRM to use an attribute as it element is in-effect a wildcard. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Tue Dec 05, 2006 1:58 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				Try 
   
	| Code: | 
   
  
	| CREATE FIRSTCHILD OF anyType Name '@undefinedAttribute' TYPE NameValue VALUE '67890'; | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shanson | 
		  
		    
			  
				 Posted: Tue Dec 05, 2006 4:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley 
  | 
		  
		    
			  
				| As an alternative, try using XMLNSC or XMLNS, and the Schema Validation supportpac IA9A (http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24010092&loc=en_US&cs=utf-8&lang=en). | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |