xsl-list
[Top] [All Lists]

Re: [xsl] [xml] using schemas/xslt/xinclude to provide normalization

2006-05-31 05:21:05
Thanks Nathan,
Entities were evaluated as well when I was evaluating xinclude.
Entities are good solution (still not pure xml approach, no fallback
mechanism, schema validating can not be done in a per chunk basis )
when you want to include whole files and not specific nodes as I need.

Think about keys in a relational database. There you can reuse data
after normalization. That is what I am after "normalyzing xml" which
means for me a way of including for a given library for example the
specific book nodes that are the same another library or bookstore can
be storing/selling.

The first option is to include the chunks using entities or xinclude.
I am wondering if there is a better way, if there are some apis for
doing so. Maybe a native database can be used, maybe a given product,
or better though it would be great if someone have been there before
analyzing these situations and has a good implementation in terms of
pure architecture to be build.

Any other thoughts guys?


On 5/30/06, Nathan Young -X (natyoung - Artizen at Cisco)
<natyoung(_at_)cisco(_dot_)com> wrote:
Hi.

You can use entities to include XML, I'm not sure if it would be a good
solution for you or not...

If you have files test1.xml and test2.xml which contain xml snippets,
you can create a file test_list.xml like so:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TestData [
<!ENTITY test1 SYSTEM "test1.xml">
<!ENTITY test2 SYSTEM "test2.xml">
]>
<TestData>
        &test1;
        &test2;
</TestData>


You can also define the entities in an external DTD but that seemed like
it wouldn't fit as well for your case...



------------>Nathan

.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:
||:.

Nathan Young
CDC Site Design & Development->Interface Development Team
A: ncy1717
E: natyoung(_at_)cisco(_dot_)com

> -----Original Message-----
> From: Nestor Urquiza [mailto:nestor(_dot_)urquiza(_at_)gmail(_dot_)com]
> Sent: Tuesday, May 30, 2006 7:26 AM
> To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> Subject: [xsl] [xml] using schemas/xslt/xinclude to provide
> normalization
>
> Hello guys,
>
> I have been thinking about different options to provide xml
> normalization meaning I want to be able to maintain xml files or
> unique nodes with information that is reused within a specific xml
> file. I gave it a try using xinclude but the parsers I have seen do
> not implement xpointer() scheme but only the element() scheme. On the
> other hand they do not provide way of selecting fragments using xpath
> expressions as XInclude propose thru #xpointer... included in the href
> attribute. Using element() I am able to maintain individual files and
> include just the particular nodes I need in my final xml files,
> however I have to keep the order of them because element works based
> on the position of children like element(/1/2) to say use the second
> child from root.
>
> I was thinking about to use in the meanwhile (seems like xerces will
> support the xpointer scheme and even an xpath scheme someday as well
> as jaxen as I read from some dom4j postings) xslt to given the
> specific nodes with ids just build the resulting xml file where the
> nodes are repeated and I can make my xpaths simpler.
>
>  In both cases above I heve always the worry about the maintanance of
> those several files that host unique nodes and I am wondering if there
> is a better solution.
>
> Still I think a better way has to exist and maybe this is using
> schemas. I hope some of you could give me directions about where to
> look for a good solution.
>
> Thanks in advance
> Nestor
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>