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

Benjamin Gould commented on THRIFT-3417:
----------------------------------------

I didn't add any actual tests for this, other than a namespace declaration in 
the TestThrift.thrift file that should fail if the compiler does not have this 
change included.  I'd be glad to add better test(s) but I'm not familiar with 
how to do that within the Thrift build framework, as the tests in the tests/ 
folder seem mostly focused on testing protocol and transport implementations.

Also I've not written much C++ for quite a while, so please check for style and 
correctness, and please do not hesitate to point any problems with my style or 
incorrectness.

Thanks

> "namespace xsd" is not really working
> -------------------------------------
>
>                 Key: THRIFT-3417
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3417
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>            Reporter: Jens Geyer
>
> The {{namespace xsd}} statement can be used to put namespace declarations 
> into the xsd. So far, so expected,. What makes it a problem is the fact, that 
> normal languages need an identifier here. In that regard, XSD is different, 
> because this should be possible to do this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> targetNamespace="http://example.com"; xmlns="http://example.com"; 
> elementFormDefault="qualified">
>     <!-- ... stuff ... -->
> </xsd:schema>
> {code}
> However, there is no way to express this in the IDL. The foillowing leads to 
> an syntax error, because the value is expected to be an identifier even for 
> xsd. 
> {code:title=example.thrift}
> namespace xsd "http://example.com";
> {code}



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

Reply via email to