[ 
https://issues.apache.org/jira/browse/JENA-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259770#comment-14259770
 ] 

ASF GitHub Bot commented on JENA-594:
-------------------------------------

GitHub user kinow opened a pull request:

    https://github.com/apache/jena/pull/15

    JENA-594 change rdfcat to print usage when empty input and to not ignore 
when redirecting stdin

    Pull request for JENA-594. Tests pass, and will add further comments in the 
[JIRA issue](https://issues.apache.org/jira/browse/JENA-594).
    
    Hope that helps,
    Bruno

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kinow/jena JENA-594

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/15.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15
    
----
commit a9ee25829138bbc1f5a09975e876ad674ce9509b
Author: Bruno P. Kinoshita <[email protected]>
Date:   2014-12-29T00:32:40Z

    JENA-594 change rdfcat to print usage when empty input and to not ignore 
when redirecting stdin

----


> rdfcat silently ignores - as stdin if input type isn't specified
> ----------------------------------------------------------------
>
>                 Key: JENA-594
>                 URL: https://issues.apache.org/jira/browse/JENA-594
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Cmd line tools
>    Affects Versions: Jena 2.11.0
>            Reporter: Joshua Taylor
>            Priority: Minor
>              Labels: rdfcat, riot
>
> Treatment of content from standard in by - and /dev/stdin differs when format 
> is not specified.
> Using -, non RDF/XML content is silently ignored.  Specifying -n gets it 
> treated correctly.
> {noformat}
> $ echo '<s> <p> <o>' | rdfcat -
> <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
> </rdf:RDF>
> $ echo '<s> <p> <o>' | rdfcat -n -
> <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
>     xmlns:j.0="file:///home/taylorj/tmp/">
>   <rdf:Description rdf:about="file:///home/taylorj/tmp/s">
>     <j.0:p rdf:resource="file:///home/taylorj/tmp/o"/>
>   </rdf:Description>
> </rdf:RDF>
> {noformat}
> -n with /dev/stdin works, too.  Using /dev/stdin with no format option blows 
> up, though.  (It's not silently ignored like - was)
> {noformat}
> $ echo '<s> <p> <o>' | rdfcat -n /dev/stdin 
> <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
>     xmlns:j.0="file:///dev/">
>   <rdf:Description rdf:about="file:///dev/s">
>     <j.0:p rdf:resource="file:///dev/o"/>
>   </rdf:Description>
> </rdf:RDF>
> $ echo '<s> <p> <o>' | rdfcat /dev/stdin 
> 11:46:21 WARN  riot                 :: {W104} Unqualified typed nodes are not 
> allowed. Type treated as a relative URI.
> 11:46:21 WARN  riot                 :: {W136} Relative URIs are not permitted 
> in RDF: specifically <s>
> 11:46:21 WARN  riot                 :: {W104} Unqualified property elements 
> are not allowed. Treated as a relative URI.
> 11:46:21 WARN  riot                 :: {W136} Relative URIs are not permitted 
> in RDF: specifically <p>
> 11:46:21 WARN  riot                 :: {W104} Unqualified typed nodes are not 
> allowed. Type treated as a relative URI.
> 11:46:21 WARN  riot                 :: {W136} Relative URIs are not permitted 
> in RDF: specifically <o>
> 11:46:21 ERROR riot                 :: XML document structures must start and 
> end within the same entity.
> Exception in thread "main" org.apache.jena.riot.RiotException: XML document 
> structures must start and end within the same entity.
>         at 
> org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:136)
> …
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to