Altova Mailing List Archives

[xsl] Query info on XSD.

From: Giuseppe Briotti <g.briotti@-----.--->
To: xsl-list@-----.------------.---
Date: 7/19/2011 6:12:00 PM
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:attr w:name="idA" w:val="18769"/>
                                            <w:attr w:name="idB" w:val="25201"/>
                                            <w:attr w:name="timeA"
                                        <w:r w:rsidRPr="00735F4B">
                                            <w:t>This is a bold text</w:t>

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.


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?




Giuseppe Briotti

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

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe@l...>


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.