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

Konrad Windszus edited comment on SLING-5922 at 9/27/18 1:47 PM:
-----------------------------------------------------------------

After checking more I think 
[https://github.com/apache/sling-org-apache-sling-jcr-contentparser/blob/master/src/main/java/org/apache/sling/jcr/contentparser/impl/JcrXmlContentParser.java]
 should be extended to support extended FileVault docview fully 
([http://jackrabbit.apache.org/filevault/docview.html]). The format is mostly a 
superset to simple JCR Docview XML (which is already supported). To a certain 
extent this is already supported, but some features are not (like 
same-name-siblings and jcr:root notation and node order). I now created 
https://issues.apache.org/jira/browse/SLING-7959 to track that.

The {{ContentLoader}} from sling-mock could as first step only have an 
additional method to import those files. IMHO for a lot of cases just importing 
a single docview xml is enough (and a whole folder structure is not necessary 
nor desired). If you need binaries as well, you can still load those 
separately. In the first step a simple import based on one file would be enough 
I think.


was (Author: kwin):
After checking more I think 
[https://github.com/apache/sling-org-apache-sling-jcr-contentparser/blob/master/src/main/java/org/apache/sling/jcr/contentparser/impl/JcrXmlContentParser.java]
 should be extended to support extended FileVault docview fully 
([http://jackrabbit.apache.org/filevault/docview.html]). The format is mostly a 
superset to simple JCR Docview XML (which is already supported). To a certain 
extent this is already supported, but some features are not (like 
same-name-siblings and jcr:root notation and node order)

In addition the {{ContentLoader}} from sling-mock needs to be extended to also 
have an additional method to import those files. IMHO for a lot of cases just 
importing a single docview xml is enough. If you need binaries as well, you can 
load those separately. In the first step a simple import based on one file 
would be enough I think.

> allow sling mock to load content from jcrvlt's xml
> --------------------------------------------------
>
>                 Key: SLING-5922
>                 URL: https://issues.apache.org/jira/browse/SLING-5922
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR, Testing
>    Affects Versions: JCR Content Parser 1.2.6, Testing Sling Mock 2.3.4
>            Reporter: Nicolas Peltier
>            Priority: Major
>
> loading test content from json is super simple and cool, but as soon as you 
> have logical content in your project that is serialized in JCR-VLT format 
> (xml), this forces you to:
> - reproduce the application xml's content in a test json file,
> - synchronize both file in later maintenance
> we should allow tester to load mock content from an arbitrary path (not 
> necessarily resource), and accept JCR-VLT format



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to