简体   繁体   English

将wsapps模式链接到另一个XML模式

[英]linking wsapps schema to another XML schema

I want to create an XML schema by linking 2 or 3 wsapps schemas. 我想通过链接2或3个wsapps模式来创建XML模式。 I tried by importing the wsapps schema(for eg: employees.xsd) in the XSD reference of the new schema I was creating. 我尝试通过将wsapps模式(例如:employees.xsd)导入正在创建的新模式的XSD参考中来进行尝试。 then I created a schema fragment and created attributes by adding complextype->model group in tree tab of the schema fragment,changed the model group to type sequence and added a reference to element. 然后我创建了一个模式片段,并通过在模式片段的树选项卡中添加complextype-> model组来创建属性,将模型组更改为类型序列并添加了对element的引用。 In the reference to element properties I selected the WS-Apps schema(for eg: employees.xsd). 在对元素属性的引用中,我选择了WS-Apps模式(例如:employees.xsd)。

But when I tried to save it I am getting below error : 但是当我尝试保存它时,出现以下错误:

org.apache.xmlbeans.XmlException: error: src-resolve.a: Could not find element 'employees'. org.apache.xmlbeans.XmlException:错误:src-resolve.a:找不到元素“雇员”。 Do you mean to refer to the element named employees@ http://schemas.cordys.com/EmployeeWsAppsPackage ? 您是指引用名为employees @ http://schemas.cordys.com/EmployeeWsAppsPackage的元素吗?

But despite throwing error it saves the document but you cannot use the document in Xforms or if you open the instance tab in the schemafragment it throws the above error again. 但是尽管抛出错误,它仍保存了文档,但是您无法在Xforms中使用该文档,或者如果您在schemafragment中打开实例选项卡,它将再次引发以上错误。

the idea was to create a single schema fragment that links to multiple ws-apps schemas.the advantage is that if the dbschema changes we can reload the wsapps schema and it will reflect in xform.From the xform we plan to trigger a bpm which will handle the updates to these tables. 这个想法是创建一个链接到多个ws-apps模式的模式片段,其优点是,如果dbschema发生更改,我们可以重新加载wsapps模式,并将其反映在xform中。从xform中,我们计划触发一个bpm处理这些表的更新。

can anybody point out what is going wrong here. 任何人都可以指出这里出了什么问题。

Ok. 好。 I was able to solve this, I think its a bug in cordys. 我能够解决这个问题,我认为这是虫草中的错误。

In text tab of the schema fragment, you can see a line like below: 在模式片段的文本选项卡中,您可以看到如下一行:

<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" ref="employees" />

change this by including the correct namespace of the XSD reference used. 通过包括使用的XSD参考的正确名称空间来更改此设置。 You should also prefix the refered element with the correct namespace. 您还应该在引用的元素前加上正确的名称空间。

 <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:emp="http://schemas.cordys.com/EmployeeWsAppsPackage" ref="emp:employees" />

In the error cordys is actually asking this but instead of a confirm dialogue, it is throwing an error dialogue. 在错误Cordy中,实际上是在问这个问题,但不是进行确认对话,而是引发错误对话。 So you cannot allow the system to make this correction. 因此,您不能允许系统进行此更正。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM