X包括问题! [英] XInclude Issue !

查看:88
本文介绍了X包括问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想将许多XML文件的一部分包含在一个独特的XML文件中,其中包含

XInclude。

示例!


File1.xml,File2.xml,File3.xml ......似乎是这样的:


< ;?xml version =" 1.0" encoding =" UTF-8"?>

<?xml-stylesheet href =" doc.xsl" type =" text / xsl"?>

<!DOCTYPE doc []>

< doc xmlns:xsi =" http:// www .w3.org / 2001 / XMLSchema-instance"

xmlns:xi =" http://www.w3.org/2001/XInclude"

xsi:noNamespaceSchemaLocation =" doc.xsd">

< group1>

< b1>

< b11> lalala< / b11>

< b12> lilili< / b12>

< / b1>

< / group1>

< / doc>


我想从每个文件中提取这个集团:


< b1>

< b11> lalala< / b11>

< b12> lilili< / b12>

< / b1>


我想创建一个像这个文件一样的独特文件:


<?xml version =" 1.0" encoding =" UTF-8"?>

<?xml-stylesheet href =" doc.xsl" type =" text / xsl"?>

<!DOCTYPE doc []>

< doc xmlns:xsi =" http:// www .w3.org / 2001 / XMLSchema-instance"

xmlns:xi =" http://www.w3.org/2001/XInclude"

xsi:noNamespaceSchemaLocation =" doc.xsd">

< group1>

< b1>

< b11> lalala< / b11>

< b12> lilili< / b12>

< / b1>

< b1>

< b11> lalala< / b11>

< b12> lilili< / b12>

< / b1>

< b1> ;

< b11> lalala< / b11>

< b12> lilili< / b12>

< / b1>

< / group1>

< / doc>

要做到这一点我已经插入了xinclude,但它不起作用:


<?xml version =" 1.0" encoding =" UTF-8"?>

<?xml-stylesheet href =" doc.xsl" type =" text / xsl"?>

<!DOCTYPE doc []>

< doc xmlns:xsi =" http:// www .w3.org / 2001 / XMLSchema-instance"

xmlns:xi =" http://www.w3.org/2001/XInclude"

xsi:noNamespaceSchemaLocation =" doc.xsd">

< group1>

< xi:include href =" File1.xml" xpointer =" group1">

< xi:fallback> NotFoundError< / xi:fallback>

< / xi:include>


< xi:include href =" File2.xml" xpointer =" group1">

< xi:fallback> NotFoundError< / xi:fallback>

< / xi:include>


< xi:include href =" File3.xml" xpointer =" group1">

< xi:fallback> NotFoundError< / xi:fallback>

< / xi:include>

< / group1>

< / doc>


怎么了?

任何帮助都会是非常感谢。


问候

Mike

解决方案

当你说 不工作,你又得到了什么?


你确定你是通过实现XInclude的软件运行的吗?


你确定可以在那些相对URI上找到这些文件(在某些系统中,

,可能区分大小写)?


< blockquote> Le Fri,2006年9月8日15:21:10 -0400,Joseph Kesselmanaécrit:


当你说不工作时,什么你得到了吗?



使用:


< xi:include href =" test.xml" xpointer =" group1">

< xi:fallbackFICHIER NON TROUVE< / xi:fallback>

< / xi:include>


出现以下错误:


"包含操作失败,恢复为回退。资源错误读取

文件为XML(href =''File1.xml'')。原因:XPointer分辨率不成功。


元素group1似乎找不到?我尝试了许多电话,例如

xpointer =" element(group1)" ...


你确定你是通过实现XInclude的软件运行的吗?



我已经尝试使用oxygenxml插件进行eclipse,有一个复选框可以激活

XInclude,我已经检查过了。


你确定可以在那些相对URI上找到文件(在某些系统中,这可能是区分大小写的吗?)



文件可以找到,每个文件File1.xml,File2.xml,...都被解析并且

i可以单独转换它们我的样式表。


谢谢!


Le Fri,2006年9月8日15:21:10 -0400,Joseph Kesselman a écrit:


当你说不工作时,你得到的是什么?



使用:


< xi:include href =" File1.xml" xpointer =" group1">

< xi:fallback404ERR< / xi:fallback>

< / xi:include>

出现以下错误:


包含操作失败,恢复为回退。资源错误读取

文件为XML(href =''File1.xml'')。原因:XPointer分辨率不成功。


元素group1似乎找不到?我尝试了许多电话,例如

xpointer =" element(group1)" ...


你确定你是通过实现XInclude的软件运行的吗?



我已经尝试使用oxygenxml插件进行eclipse,有一个复选框可以激活

XInclude,我已经检查过了。


你确定可以在那些相对URI上找到文件(在某些系统中,这可能是区分大小写的吗?)



文件可以找到,每个文件File1.xml,File2.xml,...都被解析并且

i可以单独转换它们我的样式表。


谢谢!


Hi,

I want to include a part of many XML files into an unique XML file with
XInclude.

Example!

File1.xml, File2.xml, File3.xml... seems to that :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
</group1>
</doc>

I want to extract this bloc from each files :

<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>

I want to create ONE unique file like this file :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
</group1>
</doc>
To do that i''ve inserted xinclude like that but it doesn''t work :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<xi:include href="File1.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>

<xi:include href="File2.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>

<xi:include href="File3.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
</group1>
</doc>

What''s wrong ?
Any help would be greatly appreciated.

regards
Mike

解决方案

When you say "doesn''t work", what are you getting instead?

Are you sure you''re running this through software which implements XInclude?

Are you sure the documents can be found at those relative URIs (which,
in some systems, may be case-sensitive)?


Le Fri, 08 Sep 2006 15:21:10 -0400, Joseph Kesselman a écrit :

When you say "doesn''t work", what are you getting instead?

With :

<xi:include href="test.xml" xpointer="group1">
<xi:fallbackFICHIER NON TROUVE </xi:fallback>
</xi:include>

There''s the following error:

"Include operation failed, reverting to fallback. Resource error reading
file as XML (href=''File1.xml''). Reason: XPointer resolution unsuccessful."

the element group1 seems not to be found ?? I''ve tried many calls like
xpointer="element(group1)" ...

Are you sure you''re running this through software which implements XInclude?

I''ve tryed in eclipse with oxygenxml plugin there is a checkbox to activate
XInclude, and i''ve checked it.

Are you sure the documents can be found at those relative URIs (which,
in some systems, may be case-sensitive)?

documents can be found, each file File1.xml, File2.xml, ... are parsed and
i can transform them individualy with my stylesheets.

Thank you!


Le Fri, 08 Sep 2006 15:21:10 -0400, Joseph Kesselman a écrit :

When you say "doesn''t work", what are you getting instead?

With :

<xi:include href="File1.xml" xpointer="group1">
<xi:fallback404ERR </xi:fallback>
</xi:include>

There''s the following error:

"Include operation failed, reverting to fallback. Resource error reading
file as XML (href=''File1.xml''). Reason: XPointer resolution unsuccessful."

the element group1 seems not to be found ?? I''ve tried many calls like
xpointer="element(group1)" ...

Are you sure you''re running this through software which implements XInclude?

I''ve tryed in eclipse with oxygenxml plugin there is a checkbox to activate
XInclude, and i''ve checked it.

Are you sure the documents can be found at those relative URIs (which,
in some systems, may be case-sensitive)?

documents can be found, each file File1.xml, File2.xml, ... are parsed and
i can transform them individualy with my stylesheets.

Thank you!


这篇关于X包括问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆