Posted 17 years ago by Sergey Astachov
Version: 4.0.0253
Avatar
Hello!

I have another question about attributes autocomplete...

As I know (please, correct me if I'm wrong) w3.org xml namespace defines such attributes for element as "lang", "space" and "base".

If any element in any xsd contains <xs:attribute ref="xml:base" use="optional"/> attribute definition, should I manually load such w3.org xsd scheme using schemaResolver.AddSchema("schema-path.xsd") or you may hardcoded it in xml addon (I think it is better option for your users).

If you'll decide to not include this xsd, could you please recommend the link where I can download default w3.org xsd for xml which can be easily included in my project using schemaResolver.AddSchema method.

Thanks in advance.

Comments (7)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You can download that particular schema from this URL:
http://www.w3.org/2001/xml.xsd

We'd like to get more opinions on this subject though and whether other customers feel it should be something that is natively supported, etc. Please reply and give us your input. Thanks!


Actipro Software Support

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
One follow up is, where is it declared that the xml: namespace does reference those 4 special attributes? Am I missing something when looking at the schema or is it just "assumed". Because while adding the schema to SyntaxEditor works, it doesn't know to insert the xml: and the schema validation fails until you add that in.


Actipro Software Support

Posted 11 years ago by Andrey Zenchenko
Avatar

Hi,

The concerning this topic.

If I include xml.xsd into the editor, the attributes from this schema are listed in the IntelliSence, but their namespace is incorrect (they have a namespace from the parent element).

I'd expected that these attributes appear in the IntelliSence with xml: namespace (e.g. xml:space). So, users have to add namespace prefix manualy.

Can you explain is it a bug or by design behavior?

Thank you.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andrey,

Could you make a new simple sample project that shows the issue and e-mail it to our support address so that we can examine and better understand it?  Please reference this post and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 11 years ago by Andrey Zenchenko
Avatar

Done, 

The ticket number is 26C-1928B5DC-0301

But I forgot to make reference to this post in the tiket, sorry.

Thank you.

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andrey,

Thanks for the sample.  The problem here is that you didn't define an xmlns:xml in your file so it didn't know how to map that namespace.

We've added a new XmlSchemaResolver.DefaultNamespacePrefixMappings property for the next maintenance release.  It will default to mapping the "xml" namespace prefix.  That way it will work as you expect with the sample that you sent.  And if you didn't want the "xml" namespace prefix mapped at all, you can clear it.


Actipro Software Support

Posted 11 years ago by Andrey Zenchenko
Avatar

Thank you, it would be fine!

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.