[teiid-issues] [JBoss JIRA] (TEIID-3001) Custom translator cannot control its own namespace prefix

Steven Hawkins (JIRA) issues at jboss.org
Thu Jun 12 15:19:38 EDT 2014


    [ https://issues.jboss.org/browse/TEIID-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12975821#comment-12975821 ] 

Steven Hawkins commented on TEIID-3001:
---------------------------------------

> what's the name of the utility?

There is no "utility".  I mean there is basically no usefulness in setting namespace prefixes in the DDL.  These simply get resolved away to the full uri.

> Also, I don't where the DDLStringVisitor uses anything else to obtain user defined prefixes when writing the "SET" statement or adding the options.

It doesn't need to.  There is no value in user defined prefixes.  The only reason we were doing the built-in ones differently is because we already had well-known namespace prefixes for them.  We could just as easily allow those uris to be redeclared in an automatic way.

> Custom translator cannot control its own namespace prefix
> ---------------------------------------------------------
>
>                 Key: TEIID-3001
>                 URL: https://issues.jboss.org/browse/TEIID-3001
>             Project: Teiid
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Misc. Connectors
>    Affects Versions: 8.7.1, 8.8
>            Reporter: Van Halbert
>            Assignee: Steven Hawkins
>
> When creating a custom translator, unable to control the namespace prefix:
>  SET NAMESPACE 'http://www.teiid.org/translator/infinispan/2014' AS n0
> it uses 'n0'.  
> I think the reason is the DDLStringVisitor only references BUILTIN_PREFIXES, for which is loaded from MetadataFactory.  So if your namespace isn't a built in, it ends up with 'n0'.    And the DDLStringVisitor doesn't have a way to get the MetadataFactory.namespaces that are added by calling:
> metadataFactory.addNamespace(PREFIX, URI.substring(1, URI.length()-1));



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the teiid-issues mailing list