You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2005/09/05 18:13:31 UTC

BXE and module-based schemas

Hi Lenya devs,

the new JingValidator is able to handle protocol-based includes
in Relax NG schemas, but BXE is not. This leads to a problem
when schemas which are provided by modules need to include schemas
from the core or from other modules.

I see the following solutions:

1) Merge all schemas into a single directory during the build.

    (-1, that's another step away from being "copyless" as Thorsten
    calls it, and a contract for schema locations is required)


2) Add a schema location abstraction layer which resolves schema
    locations dynamically, based on file existence:

    /schemas/docbook.rng     -> /modules/docbook/schemas/docbook.rng
    /schemas/dublincore.rng  -> /resources/schemas/dublincore.rng

    (+0.5, ambiguities can occur and a contract for schema locations
    is required)


3) Implement a schema aggregator which resolves the includes and
    outputs a monolithic schema. I took a look at Trang but didn't
    find an easy way to implement that.

    (+0.5, hard to implement)


4) Find a way to resolve the schema URI, including the protocol,
    from BXE to Lenya and load the schema accordingly.

    (+1, if possible)


WDYT? Maybe there's another solution?

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: BXE and module-based schemas

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:

[...]

> 4) Find a way to resolve the schema URI, including the protocol,
>    from BXE to Lenya and load the schema accordingly.

Sorry, that should read "pass the schema URI".

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: BXE and module-based schemas

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:

[...]

> When delivering the schemas to BXE, we could translate the
> fallback:// URL into an appropriate http request URL by resolving the
> actual source already on the server side, using a transformer.
> Or did I miss something?

I implemented a simplier solution:

- fallback:// is translated to /default/authoring/fallback/schemas/...
   (xslt/bxe/translate-rng-includes.xsl)

- this is matched and the source is resolved using fallback://

Not quite as clean as the transformer, but very easy to implement
and to understand.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: BXE and module-based schemas

Posted by Andreas Hartmann <an...@apache.org>.
Felix Röthenbacher wrote:

[...]

> IIUC the schema has to be accessible from the browser side, i.e.
> there is a need for a dedicated URL space, right?

At the moment the schemas are delivered by the publication sitemap,
but that should rather be done by the core. This means you're right,
we need a URL space for modules.


> It seems that
> this is a general problem for modules: how to access module
> resources (images, etc.) from the browser side?
> 
> One solution may be to reserve a URL "prefix" to modules. E.g.
> 
> http://localhost:8888/module/<module_name>/<module_specific_part>

How would this be handled when a proxy is used?
I'm not a proxying expert, but I guess it would be mounted
into the area URL space, wouldn't it?


   :8888/default/authoring/     -->    :80/
   :8888/modules/               -->    :80/modules/


In this case, we could even forward all requests to

   <pub>/<area>/modules/...

to the corresponding module.


BTW, last night I had this idea:

When delivering the schemas to BXE, we could translate the
fallback:// URL into an appropriate http request URL by resolving the
actual source already on the server side, using a transformer.
Or did I miss something?

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: BXE and module-based schemas

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> Felix Röthenbacher wrote:
> 
>>
>> One solution may be to reserve a URL "prefix" to modules. E.g.
>>
>> http://localhost:8888/module/<module_name>/<module_specific_part>
>>
>> 'module' means that the request goes to a specific module. A possible
>> implemention may be to mount the sitemap of the specified module.
>>
>> WDYT?
> 
> 
> 
> what about access controlling within modules?

If requested inside a publication URL space, the policies of
the publication apply.

If requested outside of a publication URL space, no policies
apply. But this case should probably not be allowed.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: BXE and module-based schemas

Posted by Michael Wechner <mi...@wyona.com>.
Felix Röthenbacher wrote:

>
> One solution may be to reserve a URL "prefix" to modules. E.g.
>
> http://localhost:8888/module/<module_name>/<module_specific_part>
>
> 'module' means that the request goes to a specific module. A possible
> implemention may be to mount the sitemap of the specified module.
>
> WDYT?


what about access controlling within modules?

Michi

>
> - Felix
>
>>
>>
>> WDYT? Maybe there's another solution?
>>
>> -- Andreas
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: dev-help@lenya.apache.org
>>
>>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: BXE and module-based schemas

Posted by Felix Röthenbacher <fe...@wyona.com>.
Hi Andreas

Please find my question inline ...

Andreas Hartmann wrote:
> Hi Lenya devs,
> 
> the new JingValidator is able to handle protocol-based includes
> in Relax NG schemas, but BXE is not. This leads to a problem
> when schemas which are provided by modules need to include schemas
> from the core or from other modules.
> 
> I see the following solutions:
> 
> 1) Merge all schemas into a single directory during the build.
> 
>    (-1, that's another step away from being "copyless" as Thorsten
>    calls it, and a contract for schema locations is required)
> 

-1

> 
> 2) Add a schema location abstraction layer which resolves schema
>    locations dynamically, based on file existence:
> 
>    /schemas/docbook.rng     -> /modules/docbook/schemas/docbook.rng
>    /schemas/dublincore.rng  -> /resources/schemas/dublincore.rng
> 
>    (+0.5, ambiguities can occur and a contract for schema locations
>    is required)
> 

-1

> 
> 3) Implement a schema aggregator which resolves the includes and
>    outputs a monolithic schema. I took a look at Trang but didn't
>    find an easy way to implement that.
> 
>    (+0.5, hard to implement)

+0

> 
> 
> 4) Find a way to resolve the schema URI, including the protocol,
>    from BXE to Lenya and load the schema accordingly.
> 
>    (+1, if possible)

+1

IIUC the schema has to be accessible from the browser side, i.e.
there is a need for a dedicated URL space, right? It seems that
this is a general problem for modules: how to access module
resources (images, etc.) from the browser side?

One solution may be to reserve a URL "prefix" to modules. E.g.

http://localhost:8888/module/<module_name>/<module_specific_part>

'module' means that the request goes to a specific module. A possible
implemention may be to mount the sitemap of the specified module.

WDYT?

- Felix

> 
> 
> WDYT? Maybe there's another solution?
> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org