Hussein -

Thanks to your help I now have XXE working using our no namespace XML
schema with styled views.

The key to the solution was:
[3] If your root element has no namespace, then you must modify the
<detect> rule in gpp.xxe.
For example, use this:
---
   <detect>
     <and>
       <rootElementNamespace xsi:nil="true"/>
       <rootElementLocalName>content_root</rootElementLocalName>
     </and>
   </detect>
---
Which means:
XXE! Apply the GPP configuration to the document you have opened if and
only if the root element of this document has "content_root", without a
namespace, as its name.

My poor attempts at obfuscation of the URL (i.e. hiding the names of our
servers) resulted in my creating more confusion and inconsistency in
describing the problem.  Both the gpp.xxe and gpp.xml files did have
consistent namespaces however it was the no namespace issue that was
causing the problem.

Now that it is working as expected I will continue to evaluate XXE for our
environment. I have more work to do in creating a proper style sheet before
I can present this to the rest of my team.

Thanks you so much for your help and for educating me on XML namespaces.

Best Regards,
Steve Deal





                                                                                
                                            
                      Hussein Shafie                                            
                                            
                      <hussein at pixware.fr>         To:      stephen.deal at 
kodak.com                                          
                                                   cc:      "xmleditor-support 
at xmlmind.com" <xmleditor-support at xmlmind.com> 
                      05/23/2005 12:07 PM          Subject: Re: [XXE] No styled 
view, CSS not found or used. How to debug?  
                      Please respond to                                         
                                            
                      "xmleditor-support at x                                   
                                               
                      mlmind.com"                                               
                                            
                                                                                
                                            
                                                                                
                                            




stephen.deal at kodak.com wrote:
> [4] Look at the title bar of the newly created document. It should
> display "gpp.xml : Style sheet : GPP".
>
> Nope. I get=>  Untitled.xml: :
>
> If it displays anything else it is certainly because your gpp.xml
> template document is *not* a GPP document. You probably forgot to
> properly declare the namespace of the root element.
>
> Yes, you are correct. As you may have surmised I am not proficient at XML
> Schema. Originally my gpp.xml template looked like this:
>   <content_root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xsi:noNamespaceSchemaLocation="
http://myCompany.com/schemas/content/prod/gpp.xsd";
>
>   xmlns:x0="http://www.w3.org/2001/XMLSchema"; >
> and while it validated against the schema and allowed me to add elements,
> it failed to display the styled view.
>
> I was able to get the styled view to display by changing the namespace
> declaration of the root element in my gpp.xml template to this:
> <content_root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://myCompany.com/schemas/content/prod/gpp.xsd";
>   xmlns="http://myCompany.com/schemas/content/prod";
> xmlns:x0="http://www.w3.org/2001/XMLSchema";>
> however now when I go to add elements the only element I can add is
<para>
> which implies that it is no longer referencing the schema.
>
> So then I tried:
>   <content_root xmlns="http://webdev.kodak.com/schemas/content/prod";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xsi:noNamespaceSchemaLocation="
http://myCompany.com/schemas/content/prod/gpp.xsd";
>
>   xmlns:x0="http://www.w3.org/2001/XMLSchema";>
> which produces a XXE Information dialog that essentially states:
> "Under these conditions, you can't do this with Standard, you must use
> Professional".

All your problems come from the fact that your gpp.xxe configuration
file and your gpp.xml file are inconsistent.

In gpp.xxe:
---
<detect>
<rootElementNamespace>http://myCompany.com/schemas/content/prod/gpp.xsd</rootElementNamespace>

</detect>
---
implies that your root element has a namespace:
http://myCompany.com/schemas/content/prod/gpp.xsd
(doesn't look like a namespace though!)

in gpp.xml:
---
<content_root xmlns="http://webdev.kodak.com/schemas/content/prod";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="
http://myCompany.com/schemas/content/prod/gpp.xsd";
xmlns:x0="http://www.w3.org/2001/XMLSchema";>
---
means
* that your root element has namespace which is
http://webdev.kodak.com/schemas/content/prod
(and which is not http://myCompany.com/schemas/content/prod/gpp.xsd!)

* and that XXE needs to use
http://myCompany.com/schemas/content/prod/gpp.xsd to validate elements
without a namespace found in gpp.xml (???).

Your problem is easy to fix by making everything consistent:

[1] I suspect that gpp.xsd has no targetNamespace (that's fine because
this will allow you to freely use Standard Edition).

[2] In such case, gpp.xml must start with:
---
<content_root
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="
http://myCompany.com/schemas/content/prod/gpp.xsd";
xmlns:x0="http://www.w3.org/2001/XMLSchema";>
---
That is, I removed: xmlns="http://webdev.kodak.com/schemas/content/prod";.

[3] If your root element has no namespace, then you must modify the
<detect> rule in gpp.xxe.

For example, use this:
---
   <detect>
     <and>
       <rootElementNamespace xsi:nil="true"/>
       <rootElementLocalName>content_root</rootElementLocalName>
     </and>
   </detect>
---
Which means:
XXE! Apply the GPP configuration to the document you have opened if and
only if the root element of this document has "content_root", without a
namespace, as its name.

Please find modified gpp.xxe attached to this email.



> To me this waas a good sign.

I think this alert dialog box will disappear once you'll fix your
configuration (if gpp.xsd really has no targetNamespace).




> I understand completely the need to constrain the Standard product in
order to provide a revenue stream through the
> Professional product.  However I am testing XXE to determine whether my
> company should purchase any licenses and before we spend the money I am
> trying to understand the following:
> 1) Can XXE Standard be configured to both validate our W3C schema and
> provide a styled view?
>   Saying no is acceptable, I just want to know if it is a problem with my
> configuration.
> 2) Would XXE Professional both validate our W3C schema and provide a
styled
> view using my configuration?
> 3) Are there any caveats in XXE Professional that would prevent it from
> being used in our environment?
>   We would use JavaWebStart and probably take advantage of the
DocumentHook
> interface.
>
> I would appreciate it if you could answer the questions 1 and 2.
> In the meanwhile I am going to see if I can get funding to acquire at
least
> one Professional license to continue investigating your product since it
> looks very promising.

I'll answer these questions as soon as your initial problem is solved.
<?xml version='1.0' encoding='ISO-8859-1'?>
<configuration name="GPP"
  xmlns="http://www.xmlmind.com/xmleditor/schema/configuration";
  xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <detect>
    <and>
      <rootElementNamespace xsi:nil="true"/>
      <rootElementLocalName>content_root</rootElementLocalName>
    </and>
  </detect>

  <css name="Style sheet" location="gpp.css" />

  <template name="GPP template" location="gpp.xml" />
</configuration>





Reply via email to