Advanced XML Language w/IntelliPrompt Beta Feedback

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The SyntaxEditor maintenance release today includes a tech preview of the advanced XML add-on with IntelliPrompt features. You'll see quick info and member list implementation for elements, attributes, and facets. There still are a number of other areas that need work but this is a big step.

To show off the new features, there is a new XML Reflection QuickStart. The QuickStart defaults to use the dynamic language XSD which now has full documentation in it. The docs show up in all the quick info tips.

Also this language is not yet optimized to work on large files so for now please only try it on small-medium sized files.

Please post your comments and bug reports here. Ideas for features are welcome too!


Actipro Software Support

Comments (20)

Posted 17 years ago by mguetg
Avatar
Hi

I have two questions about the XML add-on
1. When do you plan to release it?
2. Will it support multiple Xml-Schemas? (I've seen that the 'LoadSchema' method of the XmlSchemaResolver accepts only one Xml-Schema)

Thank you.
Marco

[Modified at 04/22/2007 08:03 AM]
Posted 17 years ago by mguetg
Avatar
It would be nice, if the IntelliPrompt will display a '<![CDATA[' entry when Ctrl+Space is hit inside an Xml-Element.

<test><![CDATA[<test>
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi,

Yes we will add functionality to load multiple schemas. LoadSchema will be intended for only loading one. But we will add an AddSchema and I think there already is a ClearSchema. AddSchema will allow you to add many into a set and in maybe we'll add a LoadSchemaSet method too.

Good idea for the CDATA too.

We'll release it as soon as it's done. It's one of our top development priorities though.


Actipro Software Support

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The next maintenance release now has the multiple schema support and CDATA tags in the member list features implemented.


Actipro Software Support

Posted 17 years ago by mguetg
Avatar
That's good news.

Thank!
Marco
Posted 17 years ago by Ali
Avatar
Hi,

First of all I would say that adding schema support is an excellent addition to Web Add-on.

I have tested addon with schema feature, therefore, I would like to provide you with the feedback. The following features would be very nice to have.

1- Multiple Schema Support

2- Get an IntelliSense even when you write your first ever start tag(i.e, '<') in a blank XML document based on a schema. For now, when you are done with writing your start tag, or root tag in other words including xmlns, then you get an IntelliSense.

3- If you have used a specific attribute for a specific tag(node), then that particular attribute should be eliminated from the IntelliSense for that particular tag(node). For exapmle, if you have a rectangle tag with width, height, x, y attributes, and you have used the width attribute once, then it should not appear in the IntelliSense drop-down list again for that particular node/tag.

In general, I would say that getting an inspiration from the Visual Studio 2005, in this regard, would be very nice in order to know that where the deficiencies are?

Thanks in Advance.


Best Regards

Mustansar
Posted 17 years ago by Cecilia Tufvesson
Avatar
We're using the schema validation for XML by using defaultnamespace.

1) When using < to get the choices of items and then choosing an item (e.g. with tab) the result is: <<action
Which is faulty, how to get rid of the first <?

2) When within an item text indicator at x <action x></action> pressing space gives the choices to choose from, when pressing space again it selects the item and adds a space
Can we choos not to have space to select?
Because sometimes that gives strange behaviour.

The 1) is important, 2) is more of a question.

Thanks,
Cecilia
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Cecilia,

1) This is fixed for the next release. It wasn't properly determining the context in that scenario. This happened at the start of the document only, right?

2) I don't think there is a default way to do that. Normally, tab inserts the item without inserting the key, but I believe all other keys (Space, A, B, etc.) do insert the keys. You could handle the KeyTyping event and cancel it there if the member list is visible. Then just call Complete on the member list class to insert the item.


Actipro Software Support

Posted 17 years ago by Cecilia Tufvesson
Avatar
Hi!
Thanks for the quick answer.
1) Yes it only happens in the beginning of the document.
2) Ok
Posted 17 years ago by Cecilia Tufvesson
Avatar
Hello!
I have a question regarding default namespace for add on.
Is it possible to set two namespaces as default?
"http://www.tat.se/cascades http://www.tat.se/kastor/kml"

Br,
Cecilia
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Unfortunately no, per XML structure only one can be the default.


Actipro Software Support

Posted 17 years ago by Cecilia Tufvesson
Avatar
We have problem with AddSchemaFile()

We have 8 different namespaces. What we want to do is to add each file then set a defaultname space, http://www.tat.se/kastor/kml, but for all other nodes specifying a namespace that particular namespace shall be used.

E.g
<page xmlns="http://www.tat.se/cascades">
Here < gives the nodes specified in namespace cascades
</page>

Our problem is that the files we're loading are not complete standalone, but according to XML standard that should be ok.
When trying to AddSchemaFile(kml.xsd) it fails since it has attribue from events
but the kml.xsd declares the event namespace xmlns:ev="http://www.tat.se/kastor/events" and then uses <xs:import namespace="http://www.tat.se/kastor/events" schemaLocation="events.xsd"/> to include the referenced namespace, therfore it should be ok.

Error message:
Additional information: The 'http://www.tat.se/kastor/events:pointer' attribute is not declared.

The files works in Visual studio/Xerces (http://xerces.apache.org/)

Br,
Cecilia
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Cecilia,

Our code basically just loads a SchemaSet behind the scenes. Although when we load each schema into it, it's compiling the SchemaSet. I have a feeling that is where this error is coming from. Can you check the stack trace to see if a SchemaSet.Compile is in there?


Actipro Software Support

Posted 17 years ago by Cecilia Tufvesson
Avatar
Hi!
Here is the call stack, so yes there is a Schema.XmlSchemaSet.Compile().

Br,
Cecilia

System.Xml.dll!System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(object sender, System.Xml.Schema.ValidationEventArgs e) + 0x19 bytes
System.Xml.dll!System.Xml.Schema.BaseProcessor.SendValidationEvent(System.Xml.Schema.XmlSchemaException e, System.Xml.Schema.XmlSeverityType severity) + 0x44 bytes
System.Xml.dll!System.Xml.Schema.Compiler.CompileAttribute(System.Xml.Schema.XmlSchemaAttribute xa = {System.Xml.Schema.XmlSchemaAttribute}) + 0x3f8 bytes
System.Xml.dll!System.Xml.Schema.Compiler.CompileAttributeGroup(System.Xml.Schema.XmlSchemaAttributeGroup attributeGroup = {System.Xml.Schema.XmlSchemaAttributeGroup}) + 0x1c3 bytes
System.Xml.dll!System.Xml.Schema.Compiler.Compile() + 0x1a5 bytes
System.Xml.dll!System.Xml.Schema.Compiler.Execute(System.Xml.Schema.XmlSchemaSet schemaSet = {System.Xml.Schema.XmlSchemaSet}, System.Xml.Schema.SchemaInfo schemaCompiledInfo = {System.Xml.Schema.SchemaInfo}) + 0x12 bytes
System.Xml.dll!System.Xml.Schema.XmlSchemaSet.Compile() + 0x125 bytes
ActiproSoftware.SyntaxEditor.Addons.Web.Net20.dll!ActiproSoftware.SyntaxEditor.Addons.Xml.XmlSchemaResolver.AddSchema(System.Xml.Schema.XmlSchema schema = {System.Xml.Schema.XmlSchema}) + 0x3f bytes
ActiproSoftware.SyntaxEditor.Addons.Web.Net20.dll!ActiproSoftware.SyntaxEditor.Addons.Xml.XmlSchemaResolver.AddSchemaFile(string path = "m:\\Project\\MotionLab\\MotionLab\\data\\resources\\kml.xsd") + 0x55 bytes
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok so there are two things we can do. Please post which you'd prefer (or both).

1) Add overloads to AddSchemaFile to add a boolean that says whether to compile. Then add a CompileSchemaSet method. In your case you would add schemas with compile=false and then call CompileSchemaSet when done.

2) Add a LoadSchemaSet methods that loads a supplied SchemaSet.


Actipro Software Support

Posted 17 years ago by Cecilia Tufvesson
Avatar
Hello!
To me the 2 alternative sounds best, but if you prefer 1 that's ok. In Visual studio you load schemas by using catalogs, which are loaded first when they are needed. Like
<SchemaCatalog>


<Schema href="C:\projects\K4\KastorDocs\schema\schema\kml.xsd" targetNamespace="http://www.tat.se/kastor/kml"/>
<Schema href="C:\projects\K4\KastorDocs\schema\schema\events.xsd" targetNamespace="http://www.tat.se/kastor/events"/>

Or what do you mean with LoadSchemaSet?

Do you have any ideas of when this will be introduced?

Br,
Cecilia
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Great, #2 is complete for the next maintenance release. A LoadSchemaSet method has been added that accepts an XmlSchemaSet object.

This will be in the upcoming maintenance release, probably this week sometime.


Actipro Software Support

Posted 17 years ago by Cecilia Tufvesson
Avatar
Hello!
Thanks we have tested with the new version and LoadSchemaSet works fine.

One request though can not the namespaces be printed out when the first item is selected?

Like
< I get a list of avialable items, I choose to add "page"
page is in name space xmlns="http://www.tat.se/cascades" could not the editor write?
<page xmlns="http://www.tat.se/cascades"></page>

when I select page?
Now it writes
<page></page> and I manually have to add xmlns="http://www.tat.se/cascades"

Thanks,
Cecilia
Posted 17 years ago by gardea
Avatar
Hi Cecilia,

Your solution may not work always because page may be present in two or more different namespaces. I would second your proposal with the following amendment: if there's only one namespace, do it the way you're suggesting; for more than one however, after page space or > bring an intelli up to choose which namespace (instead of the regular attribute list for example); then insert xmlns="...".
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Great ideas, the next maintenance release now will auto-insert the xmlns. Also, in the rare case where if there are two root elements with the same name they will appear in two separate items. You can look at the quick info to see which namespace is for which.

Just a note to anyone reading this, we added a separate forum for the XML language (web add-on) a few days ago. In the future please post feedback in that forum so we can keep it separate from general SyntaxEditor posts. Thanks much!


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.