Menu

Autocompletion in XML based on assigned XSD schema

Help
maeni70
2014-05-29
2014-06-18
  • maeni70

    maeni70 - 2014-05-29

    Hi all

    I have recognized in my copy of XML Copy Editor (for Windows) that autocompletion & insert element of known type (from XSD schema) only seems to work for elements, which are already existing in XML. Is autocompletion functionality based on assigned XSD schema not fully supported? It looks like that just existing elements are taken into account for autocompletion and XSD schema is only used for validation.

    Thanks,
    Roger

     
  • Zane U. Ji

    Zane U. Ji - 2014-05-29

    Please make sure that "network access" is enabled in the Options dialog. That option is disabled by default.

    If it's already been enabled, then there is a bug. It would be helpful if you can provide the XML and the XSD to reproduce the bug in that case.

     
  • maeni70

    maeni70 - 2014-05-29

    This option was disabled, but it does not make a difference.
    Attached XML & XSD.

     

    Last edit: maeni70 2014-05-29
  • Zane U. Ji

    Zane U. Ji - 2014-05-30

    The XML file has no schema information. It should look like

    <Properties xmlns="http://reach-it.ch/imsLoader_properties.xsd"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://reach-it.ch/imsLoader_properties.xsd imsLoader_properties.xsd">
    

    However, there is a problem in XML Copy Editor. I'll fix it in the next release.

     
  • maeni70

    maeni70 - 2014-06-11

    Yes, I know. I have attached original XML. But autocompletion also did not work with this XML when XSD schema was linked - as you recognized yourself.
    Thanks for fixing!

     
  • maeni70

    maeni70 - 2014-06-11

    I have downloaded and installed 1.2.1.2-x64. Can you verify that this bug has not been fixed in this version?

     
  • Zane U. Ji

    Zane U. Ji - 2014-06-12

    Yes, it has.

     
  • maeni70

    maeni70 - 2014-06-18

    Hi

    For me it does not work! Check attached images and this XML (I have adapted it that it matches your example):

    <?xml version="1.0" encoding="UTF-8"?>
    <Properties xmlns="http://reach-it.ch/imsLoader_properties.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://reach-it.ch/imsLoader_properties.xsd file:///C:/temp/VirtualBox/Imagic/Unil/_Deployment/140529/imsLoader_properties.xsd">
      <Service ProcessIntervalMinutes="1">
        <ExecutionTime Type="hourly" StartTime="2007-01-01T00:00:00" EndTime="">
          <DayOfWeek>Mon,Tue,Wed,Thu,Fri,Sat,Sun</DayOfWeek>
          <Hour>16</Hour>
          <Minute>0</Minute>
        </ExecutionTime>
      </Service>
      <Tasks>
        <RestRequestLoader Name="Load PPMS" Enabled="false" Scheduled="false" BaseUrl="https://ppms.eu/ethz-test" ResourceUrl="pumapi/" HttpMethod="POST" ContentType="" TaskInitScript="" StopOnErrorTaskInit="true" TaskFinishedScript="" DataScript=".\CSScripts\PPMS_GetData.cs" ImsProxyMessageTemplate=".\Templates\PPMS_request_template.xml" EditMessageScript="" PostSendScript="" MaxErrorLogCount="0" LogScriptValidation="false">
          <Parameters>
            <Parameter Name="action" Value="getprojects" ParameterType="GetOrPost"></Parameter>
            <Parameter Name="apikey" Value="" ParameterType="GetOrPost"></Parameter>
            <Parameter Name="format" Value="json" ParameterType="GetOrPost"></Parameter>
          </Parameters>
        </RestRequestLoader>
      </Tasks>
        <ImsProxy PropertiesPath="C:\IMS\iaserver_win_x64\codebase\imsclient.win.x64\xml\imsProxy_properties.xml"></ImsProxy>
        <Archive Name="Bio_EMEZ">
            <Domain></Domain>
            <User>admin</User>
            <Password></Password>
        </Archive>
    </Properties>
    

    Strange!

    Any ideas? What am I doing wrong?

    Thanks,
    Roger

     
  • maeni70

    maeni70 - 2014-06-18

    And XSD schema is correctly attached, because following message is shown, if I add empty FileLoader element:
    Fehler at line 11, column 30: empty content is not valid for content model '(ImageExtension.RefImage?,Arivis?,FolderLevels,FileLevel)'

     

Log in to post a comment.