General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion XMetal 6: Support für XSD-Annotation / Schematron / XPath 2.0 / CSS2 / VS etc.

  • spyro

    XMetal 6: Support für XSD-Annotation / Schematron / XPath 2.0 / CSS2 / VS etc.

    Participants 2
    Replies 3
    Last Activity 12 years, 3 months ago


    we would possible advise our customers to upgrade from XMetaL 4.6 to XMetaL 6 because of some new development cases in the near future. I would just like to clarify some details before:

    1.) Does XMetaL 6 support schematron validation?

    2.) Does XMetaL show XSL-annotations when inserting elements?


          This Text should be displayed when moving the cursor about the element



    3) Does XMetaL 6 support XPath 2.0 when programming macros with Visual Studio in relation to the selection object? Is code completion supported in Visual Studio Versions greater then 2005 (2008/2010) now?

    4) Does XMetaL 6 now fully support CSS 2.1, especially borders for inline elements and correct rendering of border-left/top/right/bottom?

    5) Is there support for real line-by-line-debugging in Visual Studio now (aside from breakpoints)

    6) Does XMetaL 6 need admin rights in any cases?

    Thank you in advance,


    Derek Read

    Reply to: XMetal 6: Support für XSD-Annotation / Schematron / XPath 2.0 / CSS2 / VS etc.

    1. No.

    2. No. The product has always supported something similar in the CTM file (since before Schemas existed). It allows you to add this type of description for elements and it will appear below the selected element in the Element List in XMetaL Author. The setting in the CTM file is called “LongDescription”. This feature works for both DTD and XSD based customizations. I suppose we could add code to extract this from your XSD automatically but features such as this (where there is already a current solution) are generally given lower priority than things that cannot be done.

    3a). Are you asking about the Selection.getNodesByXPath() or something else?
    3b). No. It seems there might have been some concern on Microsoft's side regarding JScript and VBScript executing. Using this technique (which still works in VS 2002, 2003 and 2005) seems to have required Visual Studio to load the script as if it was executin in order to look up COM references. This should not be a concern for a developer writing their own code, so I'm not sure why, but I don't believe Microsoft has any plans to provide similar functionality. We have not implemented a workaround for this problem but it is in our system and development is aware of it.

    4. Borders are limited to completely surrounding block elements only. We plan to improve CSS support but it is lower priority than other features we work on.

    5. I'm not sure I understand this question. Visual Studio provides debugging support so if it is not doing something you want I think this is a Visual Studio limitation. Are you asking if you can step through scripts line by line? If so that has always been possible as all versions of Visual Studio allow this with “Step-into”, “Step-over” and “Step-out” actions during execution. Perhaps you could provide more detail if I have misunderstood you.

    6. Since version 5.5 we the application fully supports Microsoft's requirements for running as a “limited” user on Vista. The same functionality is in our 6.0 release with some additional improvements to support Windows 7. So, the answer is no, you do not need admin rights to run the application (you should have admin rights to install). Any customizations you write still need to be written to be “per user” (limited user) friendly. So for example, a script you write that might call the Windows File System Object should take advantage of Windows paths such as %appdata% and %temp%, etc, when it is writing to the file system (we cannot automatically handle this and you would not want us to). Files written by XMetaL itself are never written to restricted locations as defined by Windows (such as C:Program Files for example).



    Reply to: XMetal 6: Support für XSD-Annotation / Schematron / XPath 2.0 / CSS2 / VS etc.

    Hello Derek and thanks for your quick answer,

    To 2.)
    I know about this feature but it really doesn't fit our needs:


    There is way to little space for nearly any useable description. Is there any way to expand this?

    To 3a)
    Right. We need a function so select nodes or content in relation the the active selection like


    I'm currently using XMetaL Author Developer 5.0 with Visual Studio 2005:

    I simply can't find the method getNodesByXpath within the selection-object. I only know a workaround like


    To 3b)

    Hmm, ok. That's really sad because VS is now 2 versions ahead and the problem exists for more then 5 years now… But thanks anyway for this information.

    To 4)
    Ok, I see.

    To 5)
    You are right, of course. But I am not able to edit the code while debugging it, step back, run the line again and so on (like in the IDE of VBA for example).

    Secondly I wonder if I can send command directly to XMetaL. When trying to to this via the input window with commands like  msgbox selection.ContainerName  they are not executed.

    (Translation: “The statement can not be processed while running in execute code”).

    When trying to debug XMetaL scripts from VS I got this message in the beginning (the build process is executed anyway and XMetaL starts up normally after this):
    (Translation: “Scriptcode can not be debugged. Illegal function.”)

    I am not really familiar with the internals of Visual Studio, so if you could give me some help here…

    Thank you in advance,


    Derek Read

    Reply to: XMetal 6: Support für XSD-Annotation / Schematron / XPath 2.0 / CSS2 / VS etc.

    #2. What you are seeing here is due to a bug that I would like to have addressed. The text should wrap and the text area should expand vertically. I am not sure when this was broken but it is on our list of things to fix.

    #3a. The Selection object does not have a getNodesByXPath method. Only DOMDocument and DOMElement have it. To get a DOMElement from Selection you can do this: Selection.ContainerNode.getNodesByXPath()

    Note: check your XPath statement as well. The following code should work:
    …or maybe you meant this?

    #3b. Unfortunately I think there are yet more issues coming with VS 2010 as Microsoft changes the way debugging and similar behavior functions, so we will also be dealing with those at the same time now and possibly deciding which to address.

    #5. This is not supported at this time as far as I know. I'm not sure if we will support this type of thing in future or not. There are changes (as noted above) that have been made to VS 2010 that may force us to rethink some of our functionality. I'm not sure what the purpose of running disconnected VB code would be though. Can you explain why you would want to do that?

    One thing that is clear is that VBScript is not VBA. Microsoft may simply not support the functionality you are expecting with VBScript. I'm not saying that is the case (as I don't know for sure) but it is possible that is why you see a difference.


  • You must be logged in to reply to this topic.

Lost Your Password?