I have an XML file that looks something like this:
------------------------
<?xml ...?>
<!DOCTYPE ...>
<src:fragment id="foo" ...>
<Ph:Itemsome stuff </Ph:Item>
<Ph:Itemsome more stuff </Ph:Item>
....
<Ph:Itemstill more stuff </Ph:Item>
</src:fragment>
----------------------
I want to xinclude all the children of the root element into another
XML file. I've been trying things like
<xi:include href="firstFile Name" xpointer="foo/1"/>
However, if(!) I'm understanding correctly, this would only xinclude
the *first* child of the element named 'foo'. Instead, I want to
xinclude *all* the children. I would have thought that this
<xi:include href="firstFile Name" xpointer="foo/*"/>
would work, but it generates an error:
XPointer evaluation failed: #foo/*
All the variants of this that I've tried also fail.
How do I xinclude all children of the specified element?
Mike Maxwell
CASL/ U MD 2 2772
hi,
McSwell a écrit :
I have an XML file that looks something like this:
------------------------
<?xml ...?>
<!DOCTYPE ...>
<src:fragment id="foo" ...>
<Ph:Itemsome stuff </Ph:Item>
<Ph:Itemsome more stuff </Ph:Item>
...
<Ph:Itemstill more stuff </Ph:Item>
</src:fragment>
----------------------
I want to xinclude all the children of the root element into another
XML file. I've been trying things like
<xi:include href="firstFile Name" xpointer="foo/1"/>
Provided that your XInclude engine support them, you can use the
xpointer() scheme from the XPointer framework ; usually, tools that
support them only support XPath, or a subset of XPath
If I don't make mistakes, try this :
<xi:include href="firstFile Name" xpointer="xpoin ter(/foo/node())"/>
....but I don't remember if the spec doesn't impose limitations such as
"there must be a single node" :(
You can try RefleX for performing your XInclusions where XPath is rather
well supported : http://reflex.gforge.inria.fr/
Here is a basic example with XInclude : http://reflex.gforge.inria.fr/tutori...#dtdValidation
And the result of the test suite, for DOM and SAX (both are supporting
XPath) http://reflex.gforge.inria.fr/tests-xinclude.html
However, if(!) I'm understanding correctly, this would only xinclude
the *first* child of the element named 'foo'. Instead, I want to
xinclude *all* the children. I would have thought that this
<xi:include href="firstFile Name" xpointer="foo/*"/>
would work, but it generates an error:
XPointer evaluation failed: #foo/*
All the variants of this that I've tried also fail.
How do I xinclude all children of the specified element?
Mike Maxwell
CASL/ U MD
--
Cordialement,
///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
----------------------------- http://reflex.gforge.inria.fr/
Have the RefleX !
On Jul 7, 5:23 am, Philippe Poulard <philippe.poula r...@SPAMinria. fr>
wrote:
If I don't make mistakes, try this :
<xi:include href="firstFile Name" xpointer="xpoin ter(/foo/node())"/>
Thanks, this appears to be working now!
(I should have mentioned, I was using xmllint to verify the XML doc.)
Mike Maxwell
CASL/ U MD This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erdem Guven |
last post by:
I try to include some xml documents to another one and validate them.
I get 'invalid content starting with element "xi:include".' error message at
pointsample.xml line 6 from xml plugin of jedit which uses xerces lib.
I can't find what is wrong.
Here is my files:
sample.xsd:
<?xml version="1.0"?>
<schema
|
by: CB |
last post by:
I am using xerces 2.5.0 and xalan 2.6.0, and am following the xinclude
instructions on the xerces faq at
http://xml.apache.org/xerces2-j/faq-xinclude.html, and I am having no
luck. I imagine I must be missing something fundamental, can someone
point it out, please?
Here are all the gory details;
---- command line ----
|
by: rene |
last post by:
Hello everybody,
i have these 2 xml files
------1.xml------
<?xml version="1.0" encoding="UTF-8"?>
<root>
<element>1</element>
<element>2</element>
</root>
|
by: Larry |
last post by:
Given the "includer" xml file:
<?xml version="1.0"?>
<test-includer
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:testns="http://www.w3.org/TR/REC-xml-names"
xmlns:xi="http://www.w3.org/2001/XInclude"
>
<xi:include
href="test-included.xml"
|
by: Tjerk Wolterink |
last post by:
I have an xml document that
conforms to my xschema document.
Now i wanted to use xinclude in my xml document.
But when i want to validate the xml document to the xschema
i get the following error:
--
Validating "structure.xml" against
| |
by: Sergey Numerov |
last post by:
Of the numerous XML standards, the classes of System.XML
support only XPath, XML Schema and DTD.
If I want to exploit XLink, XInclude or XQuery, can .NET
offer me anything? Are there third-party libraries that
are compatible with some/all of the mentioned standards?
How is programmatic processing of XML data that utilzes
some/all of the above typically done?
|
by: john fra |
last post by:
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"?>
|
by: Tim Arnold |
last post by:
I'm using ElementTree to access some xml configuration files, and using the
module's xinclude capability. I've got lines like this in the parent xml
file (which lives in the same directory as the included xml file):
<xi:include href="/dept/app/doc/current/en/xml/asdf/asdf_syntaxterms.xml"/>
When I started the project it was Unix-only; this worked fine. Now I have
users who want to use the system on Windows and of course that directory...
|
by: shaun roe |
last post by:
I should like to use xslt to produce a document like the following:
<crate xmlns:xi="http://www.w3.org/2001/XInclude">
<rod id="0">
<slot>1</slot>
<xi:include href="./endcapA/disk/1a/10011.xml"/<!--D1A TR
middles-->
<xi:include href="./endcapA/disk/1a/10012.xml"/<!--D1A TR
middles-->
<xi:include href="./endcapA/disk/1a/10001.xml"/<!--D1A TR
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |