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

Re: Seeking XSLT code that provides a "Go to definiti

Subject: Re: Seeking XSLT code that provides a "Go to definition"capability
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 11 Jul 2020 06:52:59 -0000
Re:  Seeking XSLT code that provides a "Go to  definiti
Hi Roger,

On Sat, Jul 11, 2020 at 3:09 AM Dr. Roger L Costello costello@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> I want to do something like this:
>
> <xsl:template match="/">
>     <Results>
>         <xsl:for-each select="//*">
>             <element>
>                 <name><xsl:value-of select="name()"/></name>
>                 <file>GET THE NAME OF THE SCHEMA FILE THAT CONTAINS THE
> ELEMENT DECLARATION</file>
>                 <maxOccurs>GET THIS VALUE FROM THE SCHEMA</maxOccurs>
>                 <minOccurs>GET THIS VALUE FROM THE SCHEMA</minOccurs>
>                 <type>
>                     <base>GET THIS VALUE FROM THE SCHEMA</base>
>                     <xsl:for-each select="facets">
>                         GET THE FACETS
>                     </xsl:for-each>
>                 </type>
>                 <annotation>GET THIS VALUE FROM THE SCHEMA</annotation>
>                 <fixed>GET THIS VALUE FROM THE SCHEMA</fixed>
>                 <default>GET THIS VALUE FROM THE SCHEMA</default>
>             </element>
>         </xsl:for-each>
>     </Results>
> </xsl:template>
>

As per your above requirements, it seems to me that, you don't want to
utilize core of XSLT transformation capability.

I think that, you're simply doing XML schema validation of an XML input
document, and then after validation assessment, you want to navigate the
XML input document and print the XML schema definitions and declarations
against each XML input element. For this, you may perhaps use Xerces PSVI
implementation (you'd need to write a java program for this). Please look
at following on Xerces FAQs, about how to do this,

<ref>
https://xerces.apache.org/xerces2-j/faq-xs.html

Accessing PSVI via DOM
Accessing PSVI via SAX
Accessing PSVI via the JAXP 1.4 Validation API
</ref>

If you'd like to access PSVI information from an XSLT transformation, I can
suggest to write a java XSLT extension wrapping the Xerces PSVI logic. This
is not trivial I guess, but doable I believe.



-- 
Regards,
Mukul Gandhi

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.