Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude tags from validation

Status
Not open for further replies.

gudderudden

IS-IT--Management
Sep 29, 2008
2
SE
hi,
I put data from a db into an xml-document that is validated against an issued (can't be edited) xsd.
The xml is then passed on to an xsl for presentation.

The problem is that I want the xsl to receive data that is not specified in the xsd.
In other words - I want to pass on data from the db without being validated.
Is there a way to exclude tags or lines from being validated?
(I tried using 'CDATA' but then the parser ignores the tag too, and I only want the xsd to ignore it).

Regards
gudderudden
 
I think validation should be more closely related to xml parsing to begin with and of less affinity to xslt processor. But there are so much out there I cannot be sure in what circumstances or implementation the xslt processor is made xsd aware, can you elucidate?
 
I'm not sure i follow your thoughts...
But elucidate I can!

I generate an XML file (invoice.xml). The tags are specified in a schema file (schema.xsd). Invoice.xml is validated against a fixed industry standard.

In invoice.xml I refer to a stylesheet (invoice_ss.xsl) for presentation in HTML. In the HTML I want to display a field from the db. Lets call the field "InvoiceType" and the the tag in the xml-file <InvoiceType>.
The problem is that the xsd doesn't allow for this tag to be validated.

So I need to exclude the tag <InvoiceType> from the validation, but still be able to use it for presentation.

/Gudderudden

 
Thanks for the followup. I am not able to visualize from what described what kind of technology being used and the setup, and the environment, so unfortunately I have to pass and cannot be not of much help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top