[oXygen-user] Xpath and Saxon return tabs as text

Sorin Ristache
Wed Sep 3 10:23:15 CDT 2008


Hello,

Saxon 9 has an option for stripping whitespace nodes but Oxygen allows 
you to set it only for transformations (Preferences -> XML -> 
XSLT-FO-XQuery -> XSLT -> Saxon -> Saxon-B/SA). If you set the above 
option to strip whitespace nodes and you run an XSLT transform that uses 
the expression //text() you can see that the list of nodes does not 
contain such nodes. In the next version we will add this Saxon 9 option 
for XPath expressions too.


Regards,
Sorin


Philipp Steinkrüger wrote:
> Dear Oxygen-Users,
> 
> i am having a problem with an indented XML File. The File looks like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <TEI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns="http://www.i-d-e.de/ns/1.0">
>     <teiHeader>
>         <fileDesc>
>             <titleStmt>
>                 <title>MS Einsiedeln</title>
>             </titleStmt>
>             <publicationStmt>
>                 <p>publicationsStmt empty</p>
>             </publicationStmt><sourceDesc>
>                 <p>sourceDesc empty</p>
>             </sourceDesc></fileDesc>
>     </teiHeader>
>     <text>
>         <body>
>             <div>
>                 <div>
>                     <div>
>                         <p><c>D</c>ie gotheit iſt beſloſſen<lb/>in dem 
> vater n<ex>atur</ex>elich
>                                 dar<lb/>vmbe iſt er alvermvgende<lb/>vnd 
> enpfat niht von ite<lb
>                                 />des<gap reason=""/> er ſelber nit en 
> iſt an<lb/>ſiner go<unclear
>                                 >tl</unclear>icher macht wan<lb/>ers 
> weſelich i<ex>n</ex> ime vnd
>                                 an<lb/>ime ſelben beſloſſen hat<space 
> unit="letters" quantity="1"
>                         /></p>
>    </div>
>      </div>
>        </div>
>     </body>
>   </text>
> </TEI>
> 
> Now, using the following XPath 2.0 expression: //text(), the tabs are 
> returned as text-nodes, for example the first tab before the tag 
> <teiHeader>. In fact, my DTD does not allow #PCDATA inside <TEI>, but 
> the document is validated without any problems. To me this seems kind of 
> schizophrenic, or am I mistaken? Btw: the same file in XMLSpy with its 
> build-in xslt engine as well as MS XML parser with the same xPath 
> expression does not return the tabs as text-nodes.
> 
> Any ideas?
> Philipp
> 
> PS: I am using Oxygen 9.3
> 
> --
> Philipp Steinkrüger M.A.
> Philosophisches Seminar der Universität zu Köln
> Thomas-Institut
> Universitätsstraße 22
> 50923 Köln
> +49 221 4702394
> 
>  <mailto:>
> http://www.thomasinstitut.uni-koeln.de
> http://www.philosophie.uni-koeln.de
> http://www.ide.de
> 
> UNIVERSITÄT ZU KÖLN
> GUTE IDEEN. SEIT 1388.



More information about the oXygen-user mailing list