[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Query info on XSD.

Subject: Query info on XSD.
From: Giuseppe Briotti <g.briotti@xxxxxxxxx>
Date: Tue, 19 Jul 2011 20:11:35 +0200
 Query info on XSD.
Hi all!

First of all, sorry for my bad english...

I have a question about a transformation from xml to xml with different xsd.

I start from a flat docx with custom tag. The following example is a
fragment of such docx:

                                    <w:customXml

w:uri="http://www.mywebsite.it/mynamespace.html"
                                        w:element="MyCustomElement">
                                        <w:customXmlPr>
                                            <w:attr w:name="idA" w:val="18769"/>
                                            <w:attr w:name="idB" w:val="25201"/>
                                            <w:attr w:name="timeA"
w:val="10:53:09"/>
                                        </w:customXmlPr>
                                        <w:r w:rsidRPr="00735F4B">
                                            <w:rPr>
                                                <w:b/>
                                            </w:rPr>
                                            <w:t>This is a bold text</w:t>
                                        </w:r>
                                    </w:customXml>

Due to the fact that this docx is generated with mynamespace XSD
loaded in MSWord, if I transform
with a XSLT such docx in my xml, I obtain as result a valid XML.

BUT!

Some of my custom tag allow presentation elements as children, and
others don't.

The idea is thus to query on my XSD to see if that particular element
allows text or paragraphs as childre.

I didn't find any example. I find xsom [1] that implements SCD [2] but
it seems that you must now the correct
and complete SCD path (probably I must implement some kind of visitor...).

I check XSLT2.0 schema aware, but if I understood right, it validates
the source XML and destination XML,
throwing exception if something goes wrong. I don't know if it is
possible, for instance, to change a template
behaviour depending on schema.

At the moment, the only working solution is to create a some king of
XML configuration file that contains all
the required information and open such file as document in xslt and
check it in a template.

This solution works fine, but probably there is a more efficient approach.

Any suggestions?

TIA

Giuseppe.

[1] http://xsom.java.net/
[2] http://www.w3.org/TR/2005/WD-xmlschema-ref-20050329/
-- 

Giuseppe Briotti
g.briotti@xxxxxxxxx

"Alme Sol, curru nitido diem qui
promis et celas aliusque et idem
nasceris, possis nihil urbe Roma
visere maius."
(Orazio)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.