Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-incubator-dev] Dependency on Validator framework


<xsl:template name="doElement">
   <other:someElement id="{@id}">
      <xsl:if test="@someAttribute">
<other:subElement><xsl:value-of select="@someAttribute"/></other:subElement>
   </other:someElement>
</xsl:template>

In the example, it would not make sense to tell a normal XML validator about the schema for namespace 'other', since the schema for someElement and someElement likely won't like XSLT-constructs in their attributes and content model. I doubt that's what you are implying, but I just want to be certain.

In other words, it will be the job of the XSL validator to read the XSL version number, point to the proper schema, and handle the validation from there (no xsi-stuff!!), with the added semantic stuff I've mentioned before as an additional layer on top.
The last time I looked at the X-Assist source code, there was some special checks to handle the content assistance based on the version attribute. It instantiated the DTD in the grammar. However, that particular DTD won't pass IP as it's copyrighted by Render-X and IP won't allow it's usage, so we'll need to instatiate the XML Schema or somehow get hooked into the XSLT Engine that is being used to get the content assist. I think the more friendly way is to leverage the XML Schema support, as we can get not only XSL content assist, but also content assist for any of the other Grammars that might appear in the XML Catalog based on the namespaces or public/system identifiers.

I've already seen this work successfully with some ebXML messages I've had to edit that contain multiple namespaces, and as long as the entries are in the XML Catalog you get content assist and structural validation for all pieces. Again the only piece missing is the ability for us to specify on editor startup what grammar should be used.

Content Assist for X-Path will probably need to be hooked into the XSLT engine (which at this point I'm going to say we should just concentrate on Xalan, as it may be a while before Saxon can be approved). We would also need some information about Variables that have been declared and their scope as well.

Again, I think we can leverage the schemas that are out there to help, but I'm not as knowledgeable about the workings of compiler, content assistance, and validators that Eclipse XSLT and X-Assist already have so you may have this handled already.

I'm just looking for functionality from a user's point of view that I've grown used to in OxygenXML, XML Spy, Stylus Studio, etc.

Dave



Back to the top