-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setProperty with full namespace not working #325
Comments
i actually am not sure if setProperty is supposed to extended form namespaces, or only namespace prefix. does the jcr specification tell? (and if its not allowed, then i don't really know what the constants on PropertyInterface are good for) |
"While a JCR name is an ordered pair of strings, (N, L), it is not itself a string. There are, however, two lexical forms (string serializations) that a JCR name can take when used in the JCR API: the expanded form and the qualified form. A JCR name that is converted to either lexical form is said to have been lexicalized." ExpandedName ::= '{' Namespace '}' LocalName QualifiedName ::= [Prefix ':'] LocalName 3.2.6 Use of Qualified and Expanded Names When a JCR name is passed as an argument to a JCR method it may be in either expanded or qualified form. When a repository returns a JCR name it must be in qualified form. The qualified form of a name depends upon the prevailing local namespace mapping of the current session (see §3.5 Namespace Mapping). |
btw I think our nomenclature in PHPCR "extended" form is wrong. In specs is used expanded :) |
okay, looks like we don't respect the spec part about expanded. probably not the most urgent thing to fix, using qualified names is good enough. afaik things like JCR_TITLE are not supposed to be used for your own content, but only for the predefined node types fields. |
I tried to update documentation in Dbal.
I wrote this code:
$post->setProperty(PropertyInterface::JCR_TITLE, 'Welcome to my Blog!'); throws
( ! ) Fatal error: Uncaught PHPCR\NamespaceException: Mapping for '{http' is not defined in /Users/pavel/Sites/jackalope-doctrine-dbal/vendor/jackalope/jackalope/src/Jackalope/NamespaceRegistry.php on line 189
Maybe setProperty isn't able to work with property name in extended form?
The text was updated successfully, but these errors were encountered: