xinclude

XercesDOMParser and XIncludes

徘徊边缘 提交于 2019-12-10 18:16:02
问题 I am attempting to get xincludes working in an existing system that uses a XercesDOMParser in xercesc to parse incoming xml from a client. I am working with Apache Xercesc v3.0.1, and the incoming XML, read from an input stream, is: <?xml version="1.0" encoding="UTF-8"?> <VisionServer xmlns:xi="http://www.w3.org/2001/XInclude"> <CompositeObject> <xi:include href="testguioutput.xml" /> while testguioutput.xml contains <?xml version="1.0" encoding="UTF-8"?> <GUIOutput> <Input>Input</Input>

How to use xpointer with Xinclude to reference elements

感情迁移 提交于 2019-12-10 13:23:25
问题 I want to merge 2 XML files with the same structure to make one. For example; Test1.xml <?xml version="1.0" encoding="UTF-8"?> <ns:Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn:TestNamespace" xsi:schemaLocation="urn:Test.Namespace Test1.xsd" > <ns:element1 id="001"> <ns:element2 id="001.1" order="1"> <ns:element3 id="001.1.1" /> </ns:element2> <ns:element2 id="001.2" order="2"> <ns:element3 id="001.1.2" /> </ns:element2> </ns:element1> </ns:Root> and Test2.xml <?xml

How to apply XSLT on XML with just XInclude

﹥>﹥吖頭↗ 提交于 2019-12-07 06:36:39
问题 I have this XML file: <?xml version="1.0"?> <xi:include href="http://www.w3schools.com/dom/books.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> and I expected that it should result in referenced remote XML file http://www.w3schools.com/dom/books.xml at the time of processing. For that purpose I created this XSL file: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs=

How to use multiple configuration files for log4j2

社会主义新天地 提交于 2019-12-05 12:08:00
I am writing Java code that tests a Java library. The library includes its own log4j2 configuration as part of the distribution. I would like to use log4j2 in my test code without modifying the library's configuration. Is there a way to have a separate log4j2 configuration for my test code? This is all running as command-line Java, no servers or web involvement at all. EDIT to try to be more clear: What I want is to be able to configure loggers, appenders, etc for the test code to use , and at the same time have the library code use its own separate configuration file for its logging. The idea

How to apply XSLT on XML with just XInclude

一世执手 提交于 2019-12-05 08:46:15
I have this XML file: <?xml version="1.0"?> <xi:include href="http://www.w3schools.com/dom/books.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> and I expected that it should result in referenced remote XML file http://www.w3schools.com/dom/books.xml at the time of processing. For that purpose I created this XSL file: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> <xsl:output method=

XInclude Schema/Namespace Validation?

点点圈 提交于 2019-12-01 22:28:50
I'm trying to use XML Includes to help manage a large XML structure that needs to be usable by both humans and machines. But am experiencing a myriad of problems when trying to construct XML files that can be validated against an existing schema. Here's a simplified example of what I'm trying to do. My "main.xml" file does not validate. <?xml version="1.0" encoding="UTF-8"?> <!-- Main.xml - This fails to validate. --> <ns1:main xsi:schemaLocation="http://www.example.com/main main.xsd" xmlns:ns1="http://www.example.com/main" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http:/

XInclude Schema/Namespace Validation?

自作多情 提交于 2019-12-01 18:40:30
问题 I'm trying to use XML Includes to help manage a large XML structure that needs to be usable by both humans and machines. But am experiencing a myriad of problems when trying to construct XML files that can be validated against an existing schema. Here's a simplified example of what I'm trying to do. My "main.xml" file does not validate. <?xml version="1.0" encoding="UTF-8"?> <!-- Main.xml - This fails to validate. --> <ns1:main xsi:schemaLocation="http://www.example.com/main main.xsd" xmlns

Copy xml document's images in different source locations into single output directory

馋奶兔 提交于 2019-12-01 09:35:55
I am having a xml document with uses xinclude for access several other xml files. <chapter xml:id="chapter1"> <title>Chapter in Main Doc</title> <section xml:id="section"> <title>Section in Main Doc 1</title> <mediaobject> <imageobject> <imagedata fileref="images/car.jpg"/> </imageobject> </mediaobject> </section> <xi:include href="../some-doc/section1.xml"/> <xi:include href="../some-doc/section2.xml"/> These other section1 and section2 xml files uses different images in different source locations. I need to copy those all images to single output directory. There fore at first, I am planning

Default support for xinclude in Java 6?

家住魔仙堡 提交于 2019-11-27 22:27:35
I see in my application that xinclude inside my parsed XML file does not work within my Java XSLT conversion. However, although I do: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setXIncludeAware(true); I'm not specifically setting the transformer factory as System.getProperty("javax.xml.transform.TransformerFactory") returns "null". My question: does the default Java (1.6 or 6) support xinclude or do I have to add an alternative XSLT parser such as Apache Xerces? According to the spec , support has been there since Java 1.5 (5). I believe XInclude support