XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: XInclude, Xpointer and a text node.

that sounds very cool.
The only missing part is how not to hardcode the values for in.xml and
out.xml in the file, but provide them from the command line.

On Friday, October 16, 2009, Philippe Poulard
<philippe.poulard@sophia.inria.fr> wrote:
> Olivier Rossel a écrit :
>
> philippe,
> could you please provide a small example (command line, or java code
> snippet) about how to
> print a self contained document from a document that contains some xincludes?
>
>
> Hi Olivier,
>
> -download RefleX and unzip
> java -jar reflex-0.4.0.jar run inclusion.xcl
>
> -inclusion.xcl:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <xcl:active-sheet xmlns:xcl="http://ns.inria.org/active-tags/xcl";>
>     <!--get an XInclude filter-->
>     <xcl:parse-filter name="xinclude" source="http://www.w3.org/2001/XInclude"/>
>     <!--connect a pipeline-->
>     <xcl:parse name="input" source="in.xml" style="stream"/>
>     <xcl:filter name="included" source="{ $input }" filter="{ $xinclude }"/>
>     <!--transform SAX to XML-->
>     <xcl:transform source="{ $included }" output="out.xml"/>
> </xcl:active-sheet>
> -An XInclude filter is just a special filter; you can also use other filters with <xcl:parse-filter> as explained here:
> http://reflex.gforge.inria.fr/tutorial-pipelinesAndFilters.html
>
> -in.xml:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <root xmlns:xi="http://www.w3.org/2001/XInclude";>
>     <xi:include href="alternate.xml" parse="xml" xpointer="xpointer(/inside/insideItr/text())"/>
> </root>
>
> -alternalte.xml:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <inside>
>  <insideItr>waza</insideItr>
> </inside>
>
> -out.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <root xmlns:xi="http://www.w3.org/2001/XInclude"; xml:base="file:///path/to/in.xml">
>     waza
> </root>
>
> you'll find another example here:
> http://reflex.gforge.inria.fr/tutorial-basics.html#dtdValidation
>
>
>
> On Thu, Oct 15, 2009 at 10:53 AM, Philippe Poulard
> <philippe.poulard@sophia.inria.fr> wrote:
>
> Olivier Rossel a écrit :
>
> short answer (from the support team of Altova) : it might exist in a
> future version.
>
> xerces supports xinclude, but i don't know if xpointer() is supported
>
> RefleX supports the xpointer() scheme as long as you use only XPath
> expressions (don't use xpointer points and ranges); of course it works in
> DOM-parsing style, but also in SAX-parsing style if your XPath expressions
> don't have to look backwards
>
> have a look at what is supported here:
> http://reflex.gforge.inria.fr/tests-xinclude.html
>
> --
> Cordialement,
>
>              ///
>             (. .)
>  --------ooO--(_)--Ooo--------
> |      Philippe Poulard       |
>  -----------------------------
>  http://reflex.gforge.inria.fr/
>       Have the RefleX !
>
>
>
>
> --
> Cordialement,
>
>               ///
>              (. .)
>  --------ooO--(_)--Ooo--------
> |      Philippe Poulard       |
>  -----------------------------
>  http://reflex.gforge.inria.fr/
>        Have the RefleX !
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS